refactor(editor): rename store api (#9518)

This commit is contained in:
Saul-Mirone
2025-01-04 12:51:56 +00:00
parent 650e4fb6b2
commit c773982ced
83 changed files with 293 additions and 290 deletions

View File

@@ -114,7 +114,7 @@ export class EmbedLinkedDocBlockComponent extends EmbedBlockComponent<EmbedLinke
};
private readonly _setDocUpdatedAt = () => {
const meta = this.doc.collection.meta.getDocMeta(this.model.pageId);
const meta = this.doc.workspace.meta.getDocMeta(this.model.pageId);
if (meta) {
const date = meta.updatedDate || meta.createDate;
this._docUpdatedAt = new Date(date);
@@ -241,7 +241,7 @@ export class EmbedLinkedDocBlockComponent extends EmbedBlockComponent<EmbedLinke
}
get linkedDoc() {
return this.std.collection.getDoc(this.model.pageId);
return this.std.workspace.getDoc(this.model.pageId);
}
private _handleDoubleClick(event: MouseEvent) {
@@ -296,7 +296,7 @@ export class EmbedLinkedDocBlockComponent extends EmbedBlockComponent<EmbedLinke
const linkedDoc = this.linkedDoc;
if (linkedDoc) {
this.disposables.add(
linkedDoc.collection.slots.docListUpdated.on(() => {
linkedDoc.workspace.slots.docListUpdated.on(() => {
this._load().catch(e => {
console.error(e);
this.isError = true;
@@ -329,7 +329,7 @@ export class EmbedLinkedDocBlockComponent extends EmbedBlockComponent<EmbedLinke
this._setDocUpdatedAt();
this.disposables.add(
this.doc.collection.slots.docListUpdated.on(() => {
this.doc.workspace.slots.docListUpdated.on(() => {
this._setDocUpdatedAt();
})
);