Skip to content

Commit

Permalink
fix(mobile): android always prompts permission when accessing backup …
Browse files Browse the repository at this point in the history
…page (#11790)

Android always prompt permission
  • Loading branch information
alextran1502 authored Aug 14, 2024
1 parent a38dd53 commit 7d5f07d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mobile/lib/providers/gallery_permission.provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7d5f07d

Please sign in to comment.