فهرست منبع

Skip synCall for logged out users

Neeraj Gupta 2 سال پیش
والد
کامیت
4ac064e327
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      lib/services/local_sync_service.dart

+ 4 - 0
lib/services/local_sync_service.dart

@@ -171,6 +171,10 @@ class LocalSyncService {
   }
   }
 
 
   Future<bool> syncAll() async {
   Future<bool> syncAll() async {
+    if (!Configuration.instance.isLoggedIn()) {
+      _logger.warning("syncCall called when user is not logged in");
+      return false;
+    }
     final stopwatch = EnteWatch("localSyncAll")..start();
     final stopwatch = EnteWatch("localSyncAll")..start();
 
 
     final localAssets = await getAllLocalAssets();
     final localAssets = await getAllLocalAssets();