-
-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Why it is needed?
I have noticed the lack of this feature during a discussion on react-native-image-crop-picker. When the app displays library photos for the user and allows him to change the limited selection, as far as I could tell, there is no way to detect when the selection change has finished in order to update the displayed photos. This leads to a poor user experience and to potential bugs (like trying to access a photo that your app no longer has access to).
Possible implementation
I have no experience with IOS native development, so I can not tell if there is any technical barriers to doing so, but I believe we should have a callback fired when the user finishes editing the allowed photo selection. As I mentioned, I would not know how to do it at first, but I can try making a PR if someone would point me on the right direction.
The result could be something like bellow.
Code sample
import {openLimitedPhotoLibraryPicker} from 'react-native-permissions';
openLimitedPhotoLibraryPicker()
.catch(() => {
console.warn('Cannot open photo library picker');
})
.then(() => {
console.log('Limited photo selection changed');
});