浏览代码

Fire remoteSync event for first collections sync

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

+ 3 - 0
lib/services/remote_sync_service.dart

@@ -169,6 +169,9 @@ class RemoteSyncService {
   Future<void> _pullDiff() async {
     _logger.info("Pulling remote diff");
     final isFirstSync = !_collectionsService.hasSyncedCollections();
+    if (isFirstSync && !_isExistingSyncSilent) {
+        Bus.instance.fire(SyncStatusUpdate(SyncStatus.applyingRemoteDiff));
+    }
     await _collectionsService.sync();
     // check and reset user's collection syncTime in past for older clients
     if (isFirstSync) {