瀏覽代碼

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 {
+    if (!Configuration.instance.isLoggedIn()) {
+      _logger.warning("syncCall called when user is not logged in");
+      return false;
+    }
     final stopwatch = EnteWatch("localSyncAll")..start();
 
     final localAssets = await getAllLocalAssets();