fix: bring local and remote delete inline
This commit is contained in:
parent
ce675a7fe2
commit
5a6b9caabc
|
@ -100,7 +100,6 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
|||
delete(collection: Collection) {
|
||||
super.delete(collection);
|
||||
|
||||
this.rootStore.documents.removeCollectionDocuments(collection.id);
|
||||
this.rootStore.documents.fetchRecentlyUpdated();
|
||||
this.rootStore.documents.fetchRecentlyViewed();
|
||||
}
|
||||
|
|
|
@ -360,8 +360,7 @@ export default class DocumentsStore extends BaseStore<Document> {
|
|||
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
|
||||
|
|
Reference in New Issue