use granular permission of for media perm request (#4609)

This commit is contained in:
Hailey
2024-06-24 11:14:40 -07:00
committed by GitHub
parent 77a512ae32
commit 873d91d466
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -20,7 +20,9 @@ const openPermissionAlert = (perm: string) => {
}
export function usePhotoLibraryPermission() {
const [res, requestPermission] = MediaLibrary.usePermissions()
const [res, requestPermission] = MediaLibrary.usePermissions({
granularPermissions: ['photo'],
})
const requestPhotoAccessIfNeeded = async () => {
// On the, we use <input type="file"> to produce a filepicker
// This does not need any permission granting.