remove `isMultiSendEnabled` feature flag

This commit is contained in:
Michael Kirk 2019-03-26 19:05:09 -06:00
parent 1357449dcc
commit 6502d7d4a5
2 changed files with 7 additions and 26 deletions

View File

@ -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

View File

@ -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