SyncManager: clean up collection handling.

master
Tom Hacohen 4 years ago
parent 626771d2c5
commit 40c3a1f114

@ -68,12 +68,7 @@ export class SyncManager {
for (const col of collections.data) { for (const col of collections.data) {
const meta = await col.getMeta(); const meta = await col.getMeta();
if (this.COLLECTION_TYPES.includes(meta.type)) { if (this.COLLECTION_TYPES.includes(meta.type)) {
// We only get the changed collections here, so always fetch store.dispatch(setCacheCollection(colMgr, col));
if (col.isDeleted) {
store.dispatch(unsetCacheCollection(colMgr, col.uid));
} else {
store.dispatch(setCacheCollection(colMgr, col));
}
await this.fetchCollection(col); await this.fetchCollection(col);
} }
} }

Loading…
Cancel
Save