mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
feat: bump blocksuite (#6078)
This commit is contained in:
@@ -20,7 +20,7 @@ export class PageManager {
|
||||
if (!pageRecord) {
|
||||
throw new Error('Page record not found');
|
||||
}
|
||||
const blockSuitePage = this.workspace.blockSuiteWorkspace.getDoc(pageId);
|
||||
const blockSuitePage = this.workspace.docCollection.getDoc(pageId);
|
||||
if (!blockSuitePage) {
|
||||
throw new Error('Page not found');
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export class PageRecordList {
|
||||
new Observable(subscriber => {
|
||||
const emit = () => {
|
||||
subscriber.next(
|
||||
this.workspace.blockSuiteWorkspace.meta.docMetas.map(
|
||||
this.workspace.docCollection.meta.docMetas.map(
|
||||
v => new PageRecord(v.id, this.workspace, this.localState)
|
||||
)
|
||||
);
|
||||
@@ -27,7 +27,7 @@ export class PageRecordList {
|
||||
emit();
|
||||
|
||||
const dispose =
|
||||
this.workspace.blockSuiteWorkspace.meta.docMetaUpdated.on(emit).dispose;
|
||||
this.workspace.docCollection.meta.docMetaUpdated.on(emit).dispose;
|
||||
return () => {
|
||||
dispose();
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ export class PageRecord {
|
||||
meta = LiveData.from<DocMeta>(
|
||||
new Observable(subscriber => {
|
||||
const emit = () => {
|
||||
const meta = this.workspace.blockSuiteWorkspace.meta.docMetas.find(
|
||||
const meta = this.workspace.docCollection.meta.docMetas.find(
|
||||
page => page.id === this.id
|
||||
);
|
||||
if (meta === undefined) {
|
||||
@@ -28,7 +28,7 @@ export class PageRecord {
|
||||
emit();
|
||||
|
||||
const dispose =
|
||||
this.workspace.blockSuiteWorkspace.meta.docMetaUpdated.on(emit).dispose;
|
||||
this.workspace.docCollection.meta.docMetaUpdated.on(emit).dispose;
|
||||
return () => {
|
||||
dispose();
|
||||
};
|
||||
@@ -42,7 +42,7 @@ export class PageRecord {
|
||||
);
|
||||
|
||||
setMeta(meta: Partial<DocMeta>): void {
|
||||
this.workspace.blockSuiteWorkspace.setDocMeta(this.id, meta);
|
||||
this.workspace.docCollection.setDocMeta(this.id, meta);
|
||||
}
|
||||
|
||||
mode: LiveData<PageMode> = LiveData.from(
|
||||
|
||||
Reference in New Issue
Block a user