File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -798,6 +798,15 @@ - (void)dismissCropper:(UIViewController *)controller selectionDone:(BOOL)select
798798 break ;
799799 case CAMERA:
800800 [controller.presentingViewController.presentingViewController dismissViewControllerAnimated: YES completion: completion];
801+ if (selectionDone) {
802+ [controller.presentingViewController.presentingViewController dismissViewControllerAnimated: YES completion: completion];
803+ } else {
804+ // if user opened camera picker, tried to crop the image,
805+ // and cancelled cropping, he would return app with promise reject
806+ [controller.presentingViewController.presentingViewController dismissViewControllerAnimated: YES completion: [self waitAnimationEnd: ^{
807+ self.reject (ERROR_PICKER_CANCEL_KEY, ERROR_PICKER_CANCEL_MSG, nil );
808+ }]];
809+ }
801810 break ;
802811 }
803812}
You can’t perform that action at this time.
0 commit comments