소스 검색

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();