diff --git a/reference/ToDo/src/ToDo/Presentation/TaskViewModel.cs b/reference/ToDo/src/ToDo/Presentation/TaskViewModel.cs index 567465a45..a01478759 100644 --- a/reference/ToDo/src/ToDo/Presentation/TaskViewModel.cs +++ b/reference/ToDo/src/ToDo/Presentation/TaskViewModel.cs @@ -1,4 +1,4 @@ -using Dialog = ToDo.Presentation.Dialogs.Dialog; +using Dialog = ToDo.Presentation.Dialogs.Dialog; namespace ToDo.Presentation; @@ -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); } }