mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -128,7 +128,7 @@ export class DocsStore extends Store {
|
||||
}
|
||||
|
||||
setDocMeta(id: string, meta: Partial<DocMeta>) {
|
||||
this.workspaceService.workspace.docCollection.setDocMeta(id, meta);
|
||||
this.workspaceService.workspace.docCollection.meta.setDocMeta(id, meta);
|
||||
}
|
||||
|
||||
setDocPrimaryModeSetting(id: string, mode: DocMode) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// the adapter is to bridge the workspace rootdoc & native js bindings
|
||||
import type { WorkspaceService } from '@affine/core/modules/workspace';
|
||||
import { createYProxy, type Y } from '@blocksuite/affine/store';
|
||||
import { createYProxy } from '@blocksuite/affine/store';
|
||||
import { LiveData, Service } from '@toeverything/infra';
|
||||
import { defaultsDeep } from 'lodash-es';
|
||||
import { Observable } from 'rxjs';
|
||||
import type * as Y from 'yjs';
|
||||
|
||||
import type { FavoriteSupportTypeUnion } from '../../constant';
|
||||
import type { FavoriteService } from '../favorite';
|
||||
|
||||
@@ -86,7 +86,7 @@ export class TagStore extends Store {
|
||||
};
|
||||
|
||||
updatePageTags = (pageId: string, tags: string[]) => {
|
||||
this.workspaceService.workspace.docCollection.setDocMeta(pageId, {
|
||||
this.workspaceService.workspace.docCollection.meta.setDocMeta(pageId, {
|
||||
tags,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user