Skip to content

armgit / ente

Public Imported from GitHub
0

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

remove redundant code

Prateek Sunal04290ff81d7f
diff --git a/mobile/apps/photos/lib/services/sync/local_sync_service.dart b/mobile/apps/photos/lib/services/sync/local_sync_service.dart
index 8e99754b83..f8fe5c3550 100644
--- a/mobile/apps/photos/lib/services/sync/local_sync_service.dart
+++ b/mobile/apps/photos/lib/services/sync/local_sync_service.dart
@@ -224,17 +224,6 @@ class LocalSyncService {
);
}
- // Mark first import as complete if user had skipped onboarding permission.
- // This handles the case where syncAll() is called for users who skipped
- // onboarding permission and later granted it - device collections get
- // populated via syncAll but first import flag was never set.
- // Permission must be granted for syncAll to reach this point.
- if (backupPreferenceService.hasSkippedOnboardingPermission) {
- await _prefs.setBool(kHasCompletedFirstImportKey, true);
- await backupPreferenceService.setOnboardingPermissionSkipped(false);
- _logger.info("first import marked complete via syncAll");
- }
-
_logger.info("syncAll took ${stopwatch.elapsed.inMilliseconds}ms ");
return hasUnsyncedFiles;
}
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 6bbc26978f..23f0f7ac8c 100644
--- a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
+++ b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart
@@ -83,13 +83,6 @@ Future<bool?> _handleFirstImportFlow(BuildContext context) async {
return null;
}
- // Clear skip flag to allow sync to proceed for first import.
- // This is the entry point when user explicitly chooses to set up backup
- // after having skipped permission during onboarding.
- if (backupPreferenceService.hasSkippedOnboardingPermission) {
- await backupPreferenceService.setOnboardingPermissionSkipped(false);
- }
-
// 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: