Skip to content
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