fix: sync bug

This commit is contained in:
alt0
2022-09-23 19:14:23 +08:00
parent 054664ef6f
commit 5ac0f91efc
6 changed files with 128 additions and 60 deletions
@@ -35,8 +35,8 @@ export abstract class ServiceBaseClass {
name: string,
callback: (meta: Map<string, any>) => void
) {
const db = await this.database.getDatabase(workspace);
db.history.onPush(name, callback);
// const db = await this.database.getDatabase(workspace);
// db.history.onPush(name, callback);
}
async onHistoryRevoke(
@@ -44,8 +44,8 @@ export abstract class ServiceBaseClass {
name: string,
callback: (meta: Map<string, any>) => void
) {
const db = await this.database.getDatabase(workspace);
db.history.onPop(name, callback);
// const db = await this.database.getDatabase(workspace);
// db.history.onPop(name, callback);
}
async undo(workspace: string) {
@@ -32,7 +32,7 @@ async function _getCurrentToken() {
const _enabled = {
demo: [],
AFFiNE: process.env['NX_KECK'] ? ['idb', 'keck'] : ['idb'],
AFFiNE: process.env['NX_KECK'] ? ['keck'] : ['idb'],
} as any;
async function _getBlockDatabase(