feat(core): remove mode and pages field from Collection (#4817)

This commit is contained in:
3720
2023-11-02 18:47:43 +08:00
committed by GitHub
parent bf17b4789b
commit 7068d5f38a
20 changed files with 1085 additions and 983 deletions
@@ -95,16 +95,11 @@ export class WorkspaceSetting {
deletePagesFromCollection(collection: Collection, idSet: Set<string>) {
const newAllowList = collection.allowList.filter(id => !idSet.has(id));
const newPages = collection.pages.filter(id => !idSet.has(id));
if (
newAllowList.length !== collection.allowList.length ||
newPages.length !== collection.pages.length
) {
if (newAllowList.length !== collection.allowList.length) {
this.updateCollection(collection.id, old => {
return {
...old,
allowList: newAllowList,
pages: newPages,
};
});
}