浏览代码

Log only when files are updated

Neeraj Gupta 3 年之前
父节点
当前提交
0da95111bb
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/services/local_sync_service.dart

+ 3 - 1
lib/services/local_sync_service.dart

@@ -231,7 +231,9 @@ class LocalSyncService {
       updatedFiles.removeWhere((file) => editedFileIDs.contains(file.localID));
       updatedFiles.removeWhere((file) => editedFileIDs.contains(file.localID));
       updatedFiles
       updatedFiles
           .removeWhere((file) => downloadedFileIDs.contains(file.localID));
           .removeWhere((file) => downloadedFileIDs.contains(file.localID));
-      _logger.info(updatedFiles.length.toString() + " files were updated.");
+      if (updatedFiles.isNotEmpty) {
+        _logger.info(updatedFiles.length.toString() + " files were updated.");
+      }
       for (final file in updatedFiles) {
       for (final file in updatedFiles) {
         await _db.updateUploadedFile(
         await _db.updateUploadedFile(
           file.localID,
           file.localID,