mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
remove isMultiSendEnabled
feature flag
This commit is contained in:
parent
1357449dcc
commit
6502d7d4a5
|
@ -2933,22 +2933,11 @@ typedef enum : NSUInteger {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UIViewController *pickerModal;
|
OWSImagePickerGridController *picker = [OWSImagePickerGridController new];
|
||||||
if (SignalAttachment.isMultiSendEnabled) {
|
picker.delegate = self;
|
||||||
OWSImagePickerGridController *picker = [OWSImagePickerGridController new];
|
|
||||||
picker.delegate = self;
|
|
||||||
|
|
||||||
OWSNavigationController *modal = [[OWSNavigationController alloc] initWithRootViewController:picker];
|
OWSNavigationController *pickerModal = [[OWSNavigationController alloc] initWithRootViewController:picker];
|
||||||
modal.ows_prefersStatusBarHidden = @(YES);
|
pickerModal.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
[self dismissKeyBoard];
|
[self dismissKeyBoard];
|
||||||
[self presentViewController:pickerModal animated:YES completion:nil];
|
[self presentViewController:pickerModal animated:YES completion:nil];
|
||||||
|
@ -3060,11 +3049,8 @@ typedef enum : NSUInteger {
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
// Non-Video image picked from library
|
// Non-Video image picked from library
|
||||||
if (SignalAttachment.isMultiSendEnabled) {
|
OWSFailDebug(
|
||||||
OWSFailDebug(@"Only use UIImagePicker for camera/video capture. Picking media from UIImagePicker is not "
|
@"Only use UIImagePicker for camera/video capture. Picking media from UIImagePicker is not supported. ");
|
||||||
@"supported. ");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// To avoid re-encoding GIF and PNG's as JPEG we have to get the raw data of
|
// 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
|
// the selected item vs. using the UIImagePickerControllerOriginalImage
|
||||||
|
|
|
@ -193,12 +193,7 @@ public class SignalAttachment: NSObject {
|
||||||
// MARK:
|
// MARK:
|
||||||
|
|
||||||
@objc
|
@objc
|
||||||
public static let isMultiSendEnabled = true
|
public static let maxAttachmentsAllowed: Int = 32
|
||||||
|
|
||||||
@objc
|
|
||||||
public static var maxAttachmentsAllowed: Int {
|
|
||||||
return isMultiSendEnabled ? 32 : 1
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: Constructor
|
// MARK: Constructor
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue