diff --git a/app/stores/CollectionsStore.js b/app/stores/CollectionsStore.js index fa518f1e..a3aa105f 100644 --- a/app/stores/CollectionsStore.js +++ b/app/stores/CollectionsStore.js @@ -100,7 +100,6 @@ export default class CollectionsStore extends BaseStore { delete(collection: Collection) { super.delete(collection); - this.rootStore.documents.removeCollectionDocuments(collection.id); this.rootStore.documents.fetchRecentlyUpdated(); this.rootStore.documents.fetchRecentlyViewed(); } diff --git a/app/stores/DocumentsStore.js b/app/stores/DocumentsStore.js index 76c3fe29..34c3fdf8 100644 --- a/app/stores/DocumentsStore.js +++ b/app/stores/DocumentsStore.js @@ -360,8 +360,7 @@ export default class DocumentsStore extends BaseStore { removeCollectionDocuments(collectionId: string) { const documents = this.inCollection(collectionId); const documentIds = documents.map(doc => doc.id); - this.recentlyViewedIds = without(this.recentlyViewedIds, ...documentIds); - documentIds.forEach(id => this.data.delete(id)); + documentIds.forEach(id => this.remove(id)); } @action