diff --git a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m index da3d2dce0..ad36d7c9b 100644 --- a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m +++ b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m @@ -653,7 +653,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { [super viewWillAppear:animated]; - // In case we're dismissing a CNContactViewController which requires default system appearance + // In case we're dismissing a CNContactViewController, or DocumentPicker which requires default system appearance [UIUtil applySignalAppearence]; [self addVisibleListeners]; @@ -3073,7 +3073,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { #pragma mark - Attachment Picking: Documents -- (void)showAttachmentDocumentPicker +- (void)showAttachmentDocumentPickerMenu { NSString *allItems = (__bridge NSString *)kUTTypeItem; NSArray *documentTypes = @[ allItems ]; @@ -3083,6 +3083,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { UIDocumentMenuViewController *menuController = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:documentTypes inMode:pickerMode]; menuController.delegate = self; + [self presentViewController:menuController animated:YES completion:nil]; } @@ -3092,6 +3093,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { didPickDocumentPicker:(UIDocumentPickerViewController *)documentPicker { documentPicker.delegate = self; + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) { + // post iOS11, document picker has no blue header. + [UIUtil applyDefaultSystemAppearence]; + } [self presentViewController:documentPicker animated:YES completion:nil]; } @@ -3102,6 +3107,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { DDLogDebug(@"%@ Picked document at url: %@", self.tag, url); NSData *attachmentData = [NSData dataWithContentsOfURL:url]; + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) { + // post iOS11, document picker has no blue header. + [UIUtil applySignalAppearence]; + } + NSString *type; NSError *typeError; [url getResourceValue:&type forKey:NSURLTypeIdentifierKey error:&typeError]; @@ -3914,7 +3924,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { @"action sheet button title when choosing attachment type") style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { - [self showAttachmentDocumentPicker]; + [self showAttachmentDocumentPickerMenu]; }]; UIImage *chooseDocumentImage = [UIImage imageNamed:@"actionsheet_document_black"]; OWSAssert(chooseDocumentImage); diff --git a/SignalServiceKit/src/Contacts/Contact.m b/SignalServiceKit/src/Contacts/Contact.m index 532b544c6..b784dc052 100644 --- a/SignalServiceKit/src/Contacts/Contact.m +++ b/SignalServiceKit/src/Contacts/Contact.m @@ -80,7 +80,6 @@ NS_ASSUME_NONNULL_BEGIN } else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberiPhone]) { phoneNumberNameMap[phoneNumber.stringValue] = NSLocalizedString(@"PHONE_NUMBER_TYPE_IPHONE", @"Label for 'IPhone' phone numbers."); - ; } else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberMobile]) { phoneNumberNameMap[phoneNumber.stringValue] = NSLocalizedString(@"PHONE_NUMBER_TYPE_MOBILE", @"Label for 'Mobile' phone numbers.");