public async Task EditListAsync(ToDoList list, string newName) { try { var item = await _listsService.EditListAsync(list.Id, newName) .ConfigureAwait(true); list.Name = item.Name; if (SelectedList?.Id == list.Id) { await SelectedListChanged.InvokeAsync(SelectedList) .ConfigureAwait(true); } OnStateChanged(); } catch (Exception ex) { await ShowErrorAsync(ex) .ConfigureAwait(true); } }