mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat(core): fav item reordering (#6302)
This commit is contained in:
@@ -90,6 +90,15 @@ export class CollectionService {
|
||||
});
|
||||
}
|
||||
|
||||
deletePageFromCollection(collectionId: string, pageId: string) {
|
||||
this.updateCollection(collectionId, old => {
|
||||
return {
|
||||
...old,
|
||||
allowList: old.allowList?.filter(id => id !== pageId),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
deleteCollection(info: DeleteCollectionInfo, ...ids: string[]) {
|
||||
const collectionsYArray = this.collectionsYArray;
|
||||
if (!collectionsYArray) {
|
||||
|
||||
@@ -195,7 +195,7 @@ export class FavoriteItemsAdapter {
|
||||
}
|
||||
|
||||
getItemId(item: WorkspaceFavoriteItem) {
|
||||
return item.id;
|
||||
return FavoriteItemsAdapter.getFavItemKey(item.id, item.type);
|
||||
}
|
||||
|
||||
getItemOrder(item: WorkspaceFavoriteItem) {
|
||||
|
||||
Reference in New Issue
Block a user