Don't show permissions pop-up until user has seen contact disclaimer (#1456)

// FREEBIE
pull/1/head
Michael Kirk 9 years ago committed by GitHub
parent 3bbdd13fbe
commit 01a3ef015f

@ -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;
}
}

Loading…
Cancel
Save