internal async Task AddTodoItemAsync() { var todoItem = new TodoItem { Description = this.AddItemDescription }; this.AllItems.Add(todoItem); this.AddItemDescription = ""; await this.SaveAsync(); }
public TodoItemViewModel(TodoItem model) { this.Model = model; this.Description = model .ObserveProperty(x => x.Description) .ToReadOnlyReactiveProperty(); this.Done = model .ToReactivePropertyAsSynchronized(x => x.Done); }
internal void RestoreTodoItem(TodoItem item) => item.Done = false;
internal async Task RemoveAsync(TodoItem item) { this.AllItems.Remove(item); await this.SaveAsync(); }