mirror of
https://github.com/status-im/react-native-image-crop-picker.git
synced 2025-02-24 19:38:13 +00:00
Revert "Adds a sortOrder flag to sort by creation date on iOS (#1090)"
This reverts commit 33fd5265e065006f1e5228d5e28ad575182f1310.
This commit is contained in:
parent
115d7c792d
commit
bc72e5b366
@ -142,7 +142,6 @@ ImagePicker.clean().then(() => {
|
||||
| mediaType | string (default any) | Accepted mediaType for image selection, can be one of: 'photo', 'video', or 'any' |
|
||||
| showsSelectedCount (ios only) | bool (default true) | Whether to show the number of selected assets |
|
||||
| forceJpg (ios only) | bool (default false) | Whether to convert photos to JPG. This will also convert any Live Photo into its JPG representation |
|
||||
| sortOrder (ios only) | string (default 'none', supported values: 'asc', 'desc', 'none') | Applies a sort order on the creation date on how media is displayed within the albums/detail photo views when opening the image picker |
|
||||
| showCropGuidelines (android only) | bool (default true) | Whether to show the 3x3 grid on top of the image during cropping |
|
||||
| showCropFrame (android only) | bool (default true) | Whether to show crop frame during cropping |
|
||||
| hideBottomControls (android only) | bool (default false) | Whether to display bottom controls |
|
||||
|
1
index.d.ts
vendored
1
index.d.ts
vendored
@ -28,7 +28,6 @@ declare module "react-native-image-crop-picker" {
|
||||
mediaType?: string;
|
||||
showsSelectedCount?: boolean;
|
||||
forceJpg?: boolean;
|
||||
sortOrder?: 'none' | 'asc' | 'desc';
|
||||
showCropGuidelines?: boolean;
|
||||
hideBottomControls?: boolean;
|
||||
enableRotationGesture?: boolean;
|
||||
|
@ -243,14 +243,6 @@ static CGSize CGSizeScale(CGSize size, CGFloat scale) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ([self.imagePickerController.sortOrder isEqualToString:@"asc"]) {
|
||||
options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending: YES]];
|
||||
}
|
||||
|
||||
if ([self.imagePickerController.sortOrder isEqualToString:@"desc"]) {
|
||||
options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending: NO]];
|
||||
}
|
||||
|
||||
self.fetchResult = [PHAsset fetchAssetsInAssetCollection:self.assetCollection options:options];
|
||||
|
||||
if ([self isAutoDeselectEnabled] && self.imagePickerController.selectedAssets.count > 0) {
|
||||
|
@ -41,7 +41,6 @@ typedef NS_ENUM(NSUInteger, QBImagePickerMediaType) {
|
||||
@property (nonatomic, assign) BOOL allowsMultipleSelection;
|
||||
@property (nonatomic, assign) NSUInteger minimumNumberOfSelection;
|
||||
@property (nonatomic, assign) NSUInteger maximumNumberOfSelection;
|
||||
@property (nonatomic, strong) NSString* sortOrder;
|
||||
|
||||
@property (nonatomic, copy) NSString *prompt;
|
||||
@property (nonatomic, assign) BOOL showsNumberOfSelectedAssets;
|
||||
|
@ -91,7 +91,6 @@ RCT_EXPORT_MODULE();
|
||||
@"mediaType": @"any",
|
||||
@"showsSelectedCount": @YES,
|
||||
@"forceJpg": @NO,
|
||||
@"sortOrder": @"none",
|
||||
@"cropperCancelText": @"Cancel",
|
||||
@"cropperChooseText": @"Choose"
|
||||
};
|
||||
@ -317,7 +316,6 @@ RCT_EXPORT_METHOD(openPicker:(NSDictionary *)options
|
||||
imagePickerController.minimumNumberOfSelection = abs([[self.options objectForKey:@"minFiles"] intValue]);
|
||||
imagePickerController.maximumNumberOfSelection = abs([[self.options objectForKey:@"maxFiles"] intValue]);
|
||||
imagePickerController.showsNumberOfSelectedAssets = [[self.options objectForKey:@"showsSelectedCount"] boolValue];
|
||||
imagePickerController.sortOrder = [self.options objectForKey:@"sortOrder"];
|
||||
|
||||
NSArray *smartAlbums = [self.options objectForKey:@"smartAlbums"];
|
||||
if (smartAlbums != nil) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user