From 01a3ef015f3c484a9b53c545ce96049a7340a8a9 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Sat, 12 Nov 2016 15:32:45 -0500 Subject: [PATCH] Don't show permissions pop-up until user has seen contact disclaimer (#1456) // FREEBIE --- Signal/src/view controllers/SignalsViewController.m | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Signal/src/view controllers/SignalsViewController.m b/Signal/src/view controllers/SignalsViewController.m index f3e52e2cb..7144e485e 100644 --- a/Signal/src/view controllers/SignalsViewController.m +++ b/Signal/src/view controllers/SignalsViewController.m @@ -190,13 +190,6 @@ } - (void)didAppearForNewlyRegisteredUser -{ - [self promptNewUserForContactsWithCompletion:^{ - [self ensureNotificationsUpToDate]; - }]; -} - -- (void)promptNewUserForContactsWithCompletion:(void (^)())completionHandler { ABAuthorizationStatus status = ABAddressBookGetAuthorizationStatus(); switch (status) { @@ -212,16 +205,18 @@ actionWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_CONTINUE", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { + [self ensureNotificationsUpToDate]; [[Environment getCurrent].contactsManager doAfterEnvironmentInitSetup]; }]]; - [self presentViewController:controller animated:YES completion:completionHandler]; + [self presentViewController:controller animated:YES completion:nil]; break; } default: { DDLogError(@"%@ Unexpected for new user to have kABAuthorizationStatus:%ld", self.tag, status); + [self ensureNotificationsUpToDate]; [[Environment getCurrent].contactsManager doAfterEnvironmentInitSetup]; - completionHandler(); + break; } }