private void OnContactUpdated(ModelUpdatedMessageResult <Contact> updateResult) { RecentContacts.UpdateCollection(updateResult.UpdatedModel, updateResult.UpdateEvent); if (RecentContacts.Count == 1 && !CurrentUser.HasShownFirstContactAchievementPrompt) { ShowFirstContactPrompt(); } }
private async void RemoveContact(Contact contact) { var result = await UserNotifier.ShowConfirmAsync("Are your sure you want to delete this contact?", "delete contact", "yes"); if (result) { var deleteResult = await _repository.DeleteContactAsync(contact); if (deleteResult.IsValid()) { RecentContacts.UpdateCollection(contact, ModelUpdateEvent.Deleted); } } }