Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix: Only try stopping sync for manual logout

Neeraj Gupta09aa2fece0a2
diff --git a/mobile/lib/core/configuration.dart b/mobile/lib/core/configuration.dart
index 845debd6be..729fc1a6c6 100644
--- a/mobile/lib/core/configuration.dart
+++ b/mobile/lib/core/configuration.dart
@@ -191,14 +191,16 @@ class Configuration {
}
Future<void> logout({bool autoLogout = false}) async {
- if (SyncService.instance.isSyncInProgress()) {
- SyncService.instance.stopSync();
- try {
- await SyncService.instance
- .existingSync()
- .timeout(const Duration(seconds: 5));
- } catch (e) {
- // ignore
+ if (!autoLogout) {
+ if (SyncService.instance.isSyncInProgress()) {
+ SyncService.instance.stopSync();
+ try {
+ await SyncService.instance
+ .existingSync()
+ .timeout(const Duration(seconds: 5));
+ } catch (e) {
+ // ignore
+ }
}
}
await _preferences.clear();