1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00

fix(mobile): android always prompts permission when accessing backup page (#11790)

Android always prompt permission
This commit is contained in:
Alex 2024-08-14 18:55:52 -05:00 committed by GitHub
parent a38dd53afd
commit 7d5f07d1c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,8 @@ class GalleryPermissionNotifier extends StateNotifier<PermissionStatus> {
// 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<PermissionStatus> {
// 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;