Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ToDo] fix: taskDetails toggle bug #793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions reference/ToDo/src/ToDo/Presentation/TaskViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dialog = ToDo.Presentation.Dialogs.Dialog;
using Dialog = ToDo.Presentation.Dialogs.Dialog;

namespace ToDo.Presentation;

Expand Down Expand Up @@ -39,7 +39,9 @@ public async ValueTask ToggleIsImportant(CancellationToken ct)
{
if (await Entity is { } task)
{
await _svc.UpdateAsync(task.ToggleIsImportant(), ct);
var updatedTask = task.ToggleIsImportant();
await _svc.UpdateAsync(updatedTask, ct);
await Entity.UpdateValue(opt => opt.Map(_ => updatedTask), ct);
}
}

Expand Down