From 7d5f07d1c76055c3c3def7e6b1a05d033f950719 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 14 Aug 2024 18:55:52 -0500 Subject: [PATCH] fix(mobile): android always prompts permission when accessing backup page (#11790) Android always prompt permission --- mobile/lib/providers/gallery_permission.provider.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mobile/lib/providers/gallery_permission.provider.dart b/mobile/lib/providers/gallery_permission.provider.dart index 7554a6a6bf..8077ca99fe 100644 --- a/mobile/lib/providers/gallery_permission.provider.dart +++ b/mobile/lib/providers/gallery_permission.provider.dart @@ -36,7 +36,8 @@ class GalleryPermissionNotifier extends StateNotifier { // Return the joint result of those two permissions final PermissionStatus status; - if (photos.isGranted && videos.isGranted) { + if ((photos.isGranted && videos.isGranted) || + (photos.isLimited && videos.isLimited)) { status = PermissionStatus.granted; } else if (photos.isDenied || videos.isDenied) { status = PermissionStatus.denied; @@ -79,7 +80,8 @@ class GalleryPermissionNotifier extends StateNotifier { // Return the joint result of those two permissions final PermissionStatus status; - if (photos.isGranted && videos.isGranted) { + if ((photos.isGranted && videos.isGranted) || + (photos.isLimited && videos.isLimited)) { status = PermissionStatus.granted; } else if (photos.isDenied || videos.isDenied) { status = PermissionStatus.denied;