diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 70c308a61..322ea111a 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 2.3.0.5 + 2.3.0.6 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/Signal/src/view controllers/MessageComposeTableViewController.m b/Signal/src/view controllers/MessageComposeTableViewController.m index 7923cf93d..e0b4b3a79 100644 --- a/Signal/src/view controllers/MessageComposeTableViewController.m +++ b/Signal/src/view controllers/MessageComposeTableViewController.m @@ -301,7 +301,7 @@ message:confirmMessage preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"") + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"TXT_CANCEL_TITLE", @"") style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { DDLogDebug(@"Cancel action"); @@ -313,8 +313,7 @@ handler:^(UIAlertAction *action) { [self.searchController setActive:NO]; - UIDevice *device = [UIDevice currentDevice]; - if ([[device model] isEqualToString:@"iPhone"]) { + if ([MFMessageComposeViewController canSendText]) { MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; picker.messageComposeDelegate = self; @@ -325,7 +324,6 @@ @" https://itunes.apple.com/us/app/signal-private-messenger/id874139669?mt=8"]; [self presentViewController:picker animated:YES completion:[UIUtil modalCompletionBlock]]; } else { - // TODO: better backup for iPods (just don't support on) UIAlertView *notPermitted = [[UIAlertView alloc] initWithTitle:@"" message:NSLocalizedString(@"UNSUPPORTED_FEATURE_ERROR", @"") @@ -342,9 +340,13 @@ self.searchController.searchBar.text = @""; //must dismiss search controller before presenting alert. - [self dismissViewControllerAnimated:YES completion:^{ + if ([self presentedViewController]) { + [self dismissViewControllerAnimated:YES completion:^{ + [self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]]; + }]; + } else { [self presentViewController:alertController animated:YES completion:[UIUtil modalCompletionBlock]]; - }]; + } } #pragma mark - SMS Composer Delegate