diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 0002ac339..79c3744e1 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -2933,22 +2933,11 @@ typedef enum : NSUInteger { return; } - UIViewController *pickerModal; - if (SignalAttachment.isMultiSendEnabled) { - OWSImagePickerGridController *picker = [OWSImagePickerGridController new]; - picker.delegate = self; + OWSImagePickerGridController *picker = [OWSImagePickerGridController new]; + picker.delegate = self; - OWSNavigationController *modal = [[OWSNavigationController alloc] initWithRootViewController:picker]; - modal.ows_prefersStatusBarHidden = @(YES); - pickerModal = modal; - } else { - UIImagePickerController *picker = [OWSImagePickerController new]; - picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; - picker.delegate = self; - picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage, (__bridge NSString *)kUTTypeMovie ]; - - pickerModal = picker; - } + OWSNavigationController *pickerModal = [[OWSNavigationController alloc] initWithRootViewController:picker]; + pickerModal.ows_prefersStatusBarHidden = @(YES); [self dismissKeyBoard]; [self presentViewController:pickerModal animated:YES completion:nil]; @@ -3060,11 +3049,8 @@ typedef enum : NSUInteger { }]; } else { // Non-Video image picked from library - if (SignalAttachment.isMultiSendEnabled) { - OWSFailDebug(@"Only use UIImagePicker for camera/video capture. Picking media from UIImagePicker is not " - @"supported. "); - } - + OWSFailDebug( + @"Only use UIImagePicker for camera/video capture. Picking media from UIImagePicker is not supported. "); // To avoid re-encoding GIF and PNG's as JPEG we have to get the raw data of // the selected item vs. using the UIImagePickerControllerOriginalImage diff --git a/SignalMessaging/attachments/SignalAttachment.swift b/SignalMessaging/attachments/SignalAttachment.swift index 48a711516..f872f3b08 100644 --- a/SignalMessaging/attachments/SignalAttachment.swift +++ b/SignalMessaging/attachments/SignalAttachment.swift @@ -193,12 +193,7 @@ public class SignalAttachment: NSObject { // MARK: @objc - public static let isMultiSendEnabled = true - - @objc - public static var maxAttachmentsAllowed: Int { - return isMultiSendEnabled ? 32 : 1 - } + public static let maxAttachmentsAllowed: Int = 32 // MARK: Constructor