Skip to content

Commit 01a3ef0

Browse files
authored
Don't show permissions pop-up until user has seen contact disclaimer (signalapp#1456)
// FREEBIE
1 parent 3bbdd13 commit 01a3ef0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Signal/src/view controllers/SignalsViewController.m

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,6 @@ - (void)viewDidAppear:(BOOL)animated {
190190
}
191191

192192
- (void)didAppearForNewlyRegisteredUser
193-
{
194-
[self promptNewUserForContactsWithCompletion:^{
195-
[self ensureNotificationsUpToDate];
196-
}];
197-
}
198-
199-
- (void)promptNewUserForContactsWithCompletion:(void (^)())completionHandler
200193
{
201194
ABAuthorizationStatus status = ABAddressBookGetAuthorizationStatus();
202195
switch (status) {
@@ -212,16 +205,18 @@ - (void)promptNewUserForContactsWithCompletion:(void (^)())completionHandler
212205
actionWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_CONTINUE", nil)
213206
style:UIAlertActionStyleCancel
214207
handler:^(UIAlertAction *action) {
208+
[self ensureNotificationsUpToDate];
215209
[[Environment getCurrent].contactsManager doAfterEnvironmentInitSetup];
216210
}]];
217211

218-
[self presentViewController:controller animated:YES completion:completionHandler];
212+
[self presentViewController:controller animated:YES completion:nil];
219213
break;
220214
}
221215
default: {
222216
DDLogError(@"%@ Unexpected for new user to have kABAuthorizationStatus:%ld", self.tag, status);
217+
[self ensureNotificationsUpToDate];
223218
[[Environment getCurrent].contactsManager doAfterEnvironmentInitSetup];
224-
completionHandler();
219+
225220
break;
226221
}
227222
}

0 commit comments

Comments
 (0)