CR: Don't just build, but present, alert controller

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 5c66e5584c
commit 1c9ce5eaf3

@ -46,9 +46,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) NSArray<NSString *> *blockedPhoneNumbers;
// Suitable to display when the user tries to perform an action which is not possible due to the user having
// Suitable when the user tries to perform an action which is not possible due to the user having
// previously denied contact access.
@property (nonatomic, readonly) UIAlertController *missingContactAccessAlertController;
- (void)presentMissingContactAccessAlertControllerFromViewController:(UIViewController *)viewController;
- (instancetype)init NS_UNAVAILABLE;

@ -297,7 +297,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Editing
- (UIAlertController *)missingContactAccessAlertController
- (void)presentMissingContactAccessAlertControllerFromViewController:(UIViewController *)viewController
{
UIAlertController *alertController = [UIAlertController
alertControllerWithTitle:NSLocalizedString(@"EDIT_CONTACT_WITHOUT_CONTACTS_PERMISSION_ALERT_TITLE", comment
@ -323,7 +323,7 @@ NS_ASSUME_NONNULL_BEGIN
[[UIApplication sharedApplication] openSystemSettings];
}]];
return alertController;
[viewController presentViewController:alertController animated:YES completion:nil];
}
- (void)presentContactViewControllerForRecipientId:(NSString *)recipientId
@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN
}
if (!self.contactsManager.isSystemContactsAuthorized) {
[fromViewController presentViewController:self.missingContactAccessAlertController animated:YES completion:nil];
[self presentMissingContactAccessAlertControllerFromViewController:fromViewController];
return;
}

@ -770,9 +770,7 @@ NS_ASSUME_NONNULL_BEGIN
}
if (!self.contactsManager.isSystemContactsAuthorized) {
[self presentViewController:self.contactsViewHelper.missingContactAccessAlertController
animated:YES
completion:nil];
[self.contactsViewHelper presentMissingContactAccessAlertControllerFromViewController:self];
return;
}

Loading…
Cancel
Save