Skip to content

Commit 003ccdd

Browse files
refactor
1 parent aca4639 commit 003ccdd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/ios/SOSPicker.m

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,13 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker
282282
}
283283

284284
- (void) closeImagePicker:(CDVInvokedUrlCommand *)command {
285-
if (self.imagePicker && self.imagePicker.presentingViewController) {
286-
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
287-
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:TRUE];
285+
bool boolMessage = FALSE;
286+
if (self.imagePicker && self.imagePicker.presentingViewController) {
287+
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
288+
boolMessage = TRUE;
289+
}
290+
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:boolMessage];
288291
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
289-
} else {
290-
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:FALSE];
291-
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
292-
}
293292
}
294293

295294
@end

0 commit comments

Comments
 (0)