From 40c3a1f114bb2572672f2a17e7c276a944c6b5b7 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 7 Aug 2020 18:23:29 +0300 Subject: [PATCH] SyncManager: clean up collection handling. --- src/sync/SyncManager.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/sync/SyncManager.ts b/src/sync/SyncManager.ts index c489b83..f1c3357 100644 --- a/src/sync/SyncManager.ts +++ b/src/sync/SyncManager.ts @@ -68,12 +68,7 @@ export class SyncManager { for (const col of collections.data) { const meta = await col.getMeta(); if (this.COLLECTION_TYPES.includes(meta.type)) { - // We only get the changed collections here, so always fetch - if (col.isDeleted) { - store.dispatch(unsetCacheCollection(colMgr, col.uid)); - } else { - store.dispatch(setCacheCollection(colMgr, col)); - } + store.dispatch(setCacheCollection(colMgr, col)); await this.fetchCollection(col); } }