Fix image crop modal failing to show
Fixes https://github.com/ivpusic/react-native-image-crop-picker/issues/1631
If the controller is being dismissed, we shouldn't be presenting from that controller.
Test Plan
No longer getting
[UIKitCore] Attempt to present <TOCropViewController: 0x104840200> on
<PHPickerViewController: 0x12bf0ece0> (from <PHPickerViewController: 0x12bf0ece0>) whose
view is not in the window hierarchy.
when trying to present the cropper right after the Expo image picker.
See the video in https://github.com/bluesky-social/social-app/pull/7194 to show the interaction. Before the fix, we were getting that log and the cropper would not show up.
I tried this fix and it works on iPhone 15 pro & iPhone 8 plus, but for some reason on iPhone 7 not.
We were getting this issue when we upgraded from Expo 51 (RN 0.74) to Expo 52 (RN 0.76). We created a patch based on this PR and that fixed it for us.