Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compose: Do try to save photos to device camera roll, after all
In 2c2141b, we stopped passing `saveToPhotos: true` to launchCamera, since it seemed unnecessary, and also awkward to have to request storage permissions. But Greg found that it's quite normal for apps with messaging to save photos to storage when capturing from the camera [1] [2]. We also found that Android's "scoped storage" feature, which we've enabled on Android 10+, means that this won't come with the extra storage-permission request on Android 10+. We do need a permissions check for Android 9 and below, though. And since the react-native-image-picker upgrade in 36d3644, that package hasn't been doing that permissions check for us. So we have to do it ourselves; we reuse androidEnsureStoragePermission from src/lightbox/download.js for that. For what this UI looks like, see https://chat.zulip.org/#narrow/stream/48-mobile/topic/saving.20photos.20to.20device.20on.20capture/near/1271686. It will also mean a permission check on iOS, regardless of iOS version; but again, other apps are doing this. So, bring back `saveToPhotos: true`. [1] https://chat.zulip.org/#narrow/stream/48-mobile/topic/saving.20photos.20to.20device.20on.20capture/near/1271585 [2] https://chat.zulip.org/#narrow/stream/48-mobile/topic/saving.20photos.20to.20device.20on.20capture/near/1271597
- Loading branch information