mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(nbstore): check before save empty update (#10304)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { IndexedDBDocStorage } from '@affine/nbstore/idb';
|
||||
import { SqliteDocStorage } from '@affine/nbstore/sqlite';
|
||||
import { IndexedDBDocStorage, IndexedDBSyncStorage } from '@affine/nbstore/idb';
|
||||
import { SqliteDocStorage, SqliteSyncStorage } from '@affine/nbstore/sqlite';
|
||||
import type { StoreClient } from '@affine/nbstore/worker/client';
|
||||
import { Entity } from '@toeverything/infra';
|
||||
|
||||
@@ -16,6 +16,10 @@ export class UserDBEngine extends Entity<{
|
||||
BUILD_CONFIG.isElectron || BUILD_CONFIG.isIOS
|
||||
? SqliteDocStorage
|
||||
: IndexedDBDocStorage;
|
||||
SyncStorageType =
|
||||
BUILD_CONFIG.isElectron || BUILD_CONFIG.isIOS
|
||||
? SqliteSyncStorage
|
||||
: IndexedDBSyncStorage;
|
||||
|
||||
canGracefulStop() {
|
||||
// TODO(@eyhn): Implement this
|
||||
@@ -40,6 +44,14 @@ export class UserDBEngine extends Entity<{
|
||||
type: 'userspace',
|
||||
},
|
||||
},
|
||||
sync: {
|
||||
name: this.SyncStorageType.identifier,
|
||||
opts: {
|
||||
id: `${serverService.server.id}:` + this.userId,
|
||||
type: 'userspace',
|
||||
flavour: serverService.server.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
remotes: {
|
||||
cloud: {
|
||||
|
||||
Reference in New Issue
Block a user