Skip to content

Commit

Permalink
fix: Make sure to update the latest version of Task
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed May 24, 2022
1 parent 69641ad commit 5675b31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ToDo/Presentation/TaskViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public partial class TaskViewModel
private TaskViewModel(
INavigator navigator,
ITaskService svc,
IMessenger messenger,
ToDoTask entity)
{
_navigator = navigator;
Expand All @@ -21,6 +22,8 @@ private TaskViewModel(
await _svc.UpdateAsync(task, ct);
}
});

messenger.Observe(Entity, task => task.Id);
}

public IState<ToDoTask> Entity { get; }
Expand Down

0 comments on commit 5675b31

Please sign in to comment.