Skip to content

Commit

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

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

@end

0 comments on commit 003ccdd

Please sign in to comment.