Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Avoid persisting denied photo permission

Neeraj Guptab79b214eb02b
diff --git a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
index 2c584f339a..646723f442 100644
--- a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
+++ b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
@@ -82,6 +82,8 @@ Future<bool?> _handleFirstImportFlow(BuildContext context) async {
return null;
}
+ await permissionService.onUpdatePermission(state);
+
// Trigger local sync before showing the loading widget.
// The skip flag was cleared above, so sync will now proceed with first import.
// We use LocalSyncService.sync() directly because:
@@ -99,9 +101,7 @@ Future<bool?> _handleFirstImportFlow(BuildContext context) async {
Future<PermissionState?> _requestPermissions() async {
try {
- final state = await permissionService.requestPhotoMangerPermissions();
- await permissionService.onUpdatePermission(state);
- return state;
+ return permissionService.requestPhotoMangerPermissions();
} catch (e, s) {
_logger.severe("Failed to request permission", e, s);
return null;