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
798
798
break ;
799
799
case CAMERA:
800
800
[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
+ }
801
810
break ;
802
811
}
803
812
}
You can’t perform that action at this time.
0 commit comments