public static async Task Remove(Models.Todo todo) { AllTodos.Remove(todo); await Save(); Search(_searchTerm); }
public static async Task AddOrUpdate(Models.Todo todo) { if (!Todos.Contains(todo)) { // Do not add the todo when the text is empty. // TODO: Return message to user about this. if (!String.IsNullOrWhiteSpace(todo.Text)) { AllTodos.Add(todo); await Save(); } Search(_searchTerm); } }