diff --git a/Signal/src/ViewControllers/ContactsViewHelper.m b/Signal/src/ViewControllers/ContactsViewHelper.m index f65800c88..f3a3032f5 100644 --- a/Signal/src/ViewControllers/ContactsViewHelper.m +++ b/Signal/src/ViewControllers/ContactsViewHelper.m @@ -328,6 +328,10 @@ NS_ASSUME_NONNULL_BEGIN // Not actually a "new" contact, but this brings up the edit form rather than the "Read" form // saving our users a tap in some cases when we already know they want to edit. contactViewController = [CNContactViewController viewControllerForNewContact:cnContact]; + + // Default title is "New Contact". We could give a more descriptive title, but anything + // seems redundant - the context is sufficiently clear. + contactViewController.title = @""; } else { contactViewController = [CNContactViewController viewControllerForContact:cnContact]; } diff --git a/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m b/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m index e4c658134..df591c212 100644 --- a/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m +++ b/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m @@ -155,7 +155,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)didFinishEditingContact { DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__); - [self dismissViewControllerAnimated:YES completion:nil]; + [self dismissViewControllerAnimated:NO completion:nil]; } #pragma mark - CNContactViewControllerDelegate @@ -163,8 +163,16 @@ NS_ASSUME_NONNULL_BEGIN - (void)contactViewController:(CNContactViewController *)viewController didCompleteWithContact:(nullable CNContact *)contact { - DDLogDebug(@"%@ done editing contact.", self.tag); - [self dismissViewControllerAnimated:YES completion:nil]; + if (contact) { + // Saving normally returns you to the "Show Contact" view + // which we're not interested in, so we skip it here. There is + // an unfortunate blip of the "Show Contact" view on slower devices. + DDLogDebug(@"%@ completed editing contact.", self.tag); + [self dismissViewControllerAnimated:NO completion:nil]; + } else { + DDLogDebug(@"%@ canceled editing contact.", self.tag); + [self dismissViewControllerAnimated:YES completion:nil]; + } } #pragma mark - ContactsViewHelperDelegate