Skip to content

Commit 0acacb9

Browse files
fix picker bug
1 parent 9238acc commit 0acacb9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ios/SOSPicker.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ - (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(N
8383
picker.colsInPortrait = 4;
8484
picker.colsInLandscape = 6;
8585
picker.minimumInteritemSpacing = 2.0;
86-
self.imagePicker = picker;
8786

8887
if(!disable_popover) {
8988
picker.modalPresentationStyle = UIModalPresentationPopover;
@@ -283,8 +282,8 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
283282

284283
- (void) closeImagePicker:(CDVInvokedUrlCommand *)command {
285284
bool boolMessage = FALSE;
286-
if (self.imagePicker && self.imagePicker.presentingViewController) {
287-
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
285+
if (self.viewController != nil) {
286+
[self.viewController dismissViewControllerAnimated:YES completion:nil];
288287
boolMessage = TRUE;
289288
}
290289
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:boolMessage];

0 commit comments

Comments
 (0)