mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
refactor(editor): rename store api (#9518)
This commit is contained in:
@@ -55,7 +55,7 @@ export class SurfaceRefNotePortal extends WithDisposable(ShadowlessElement) {
|
||||
|
||||
const doc = this.model.doc;
|
||||
this._disposables.add(() => {
|
||||
doc.blockCollection.clearQuery(query, true);
|
||||
doc.doc.clearQuery(query, true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export class SurfaceRefNotePortal extends WithDisposable(ShadowlessElement) {
|
||||
console.error('Query is not set before rendering note preview');
|
||||
return nothing;
|
||||
}
|
||||
const doc = this.model.doc.blockCollection.getDoc({
|
||||
const doc = this.model.doc.doc.getBlocks({
|
||||
query: this.query,
|
||||
readonly: true,
|
||||
});
|
||||
|
||||
@@ -336,8 +336,8 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
|
||||
];
|
||||
}
|
||||
|
||||
const doc = [...this.std.collection.docs.values()]
|
||||
.map(doc => doc.getDoc())
|
||||
const doc = [...this.std.workspace.docs.values()]
|
||||
.map(doc => doc.getBlocks())
|
||||
.find(
|
||||
doc =>
|
||||
doc.getBlock(this.model.reference) ||
|
||||
@@ -370,7 +370,7 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
|
||||
|
||||
this._referencedModel =
|
||||
referencedModel && referencedModel.xywh ? referencedModel : null;
|
||||
this._previewDoc = this.doc.collection.getDoc(docId, {
|
||||
this._previewDoc = this.doc.workspace.getDoc(docId, {
|
||||
readonly: true,
|
||||
});
|
||||
this._referenceXYWH = this._referencedModel?.xywh ?? null;
|
||||
|
||||
Reference in New Issue
Block a user