Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
parveshneedhoo committed May 16, 2024
1 parent 5721d28 commit aca4639
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ios/SOSPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,13 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
}

- (void) closeImagePicker:(CDVInvokedUrlCommand *)command {
if (self.imagePicker.presentingViewController) {
CDVPluginResult* pluginResult = nil;
NSArray* emptyArray = [NSArray array];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:emptyArray];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
if (self.imagePicker && self.imagePicker.presentingViewController) {
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:TRUE];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
} else {
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:FALSE];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
}
}

Expand Down

0 comments on commit aca4639

Please sign in to comment.