Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Fix startup auto-logout cleanup

Neeraj Gupta32be78e7432a
diff --git a/mobile/apps/photos/lib/core/configuration.dart b/mobile/apps/photos/lib/core/configuration.dart
index 486c8f0a26..68ec188bd6 100644
--- a/mobile/apps/photos/lib/core/configuration.dart
+++ b/mobile/apps/photos/lib/core/configuration.dart
@@ -211,9 +211,6 @@ class Configuration {
}
}
- // Reset feed cutoff so it is recreated for the next login session.
- await localSettings.clearSharedPhotoFeedCutoffTime();
-
// Clear preferences and secure storage
await _preferences.clear();
await _secureStorage.deleteAll();
@@ -250,7 +247,9 @@ class Configuration {
// Clear all service caches
await SimilarImagesService.instance.clearCache();
await IgnoredFilesService.instance.reset();
- unawaited(HomeWidgetService.instance.clearWidget(autoLogout));
+ if (!autoLogout) {
+ unawaited(HomeWidgetService.instance.clearWidget(autoLogout));
+ }
// Clear additional caches (safe to call even if not initialized)
try {
diff --git a/mobile/apps/photos/lib/utils/local_settings.dart b/mobile/apps/photos/lib/utils/local_settings.dart
index 3240f94f8b..12aa544305 100644
--- a/mobile/apps/photos/lib/utils/local_settings.dart
+++ b/mobile/apps/photos/lib/utils/local_settings.dart
@@ -459,10 +459,6 @@ class LocalSettings {
return cutoff;
}
- Future<void> clearSharedPhotoFeedCutoffTime() async {
- await _prefs.remove(_kSharedPhotoFeedCutoffTime);
- }
-
int wrapped2025ResumeIndex() {
return _prefs.getInt(_kWrapped2025ResumeIndex) ?? 0;
}