feat(y-indexeddb): remove id (#2810)

This commit is contained in:
Alex Yang
2023-06-17 13:58:48 +08:00
committed by GitHub
parent deeafb3a12
commit c68220166a
6 changed files with 68 additions and 68 deletions

View File

@@ -66,7 +66,7 @@ export const CRUD: WorkspaceCRUD<WorkspaceFlavour.LOCAL> = {
WorkspaceFlavour.LOCAL
);
BlockSuiteWorkspace.Y.applyUpdateV2(blockSuiteWorkspace.doc, binary);
const persistence = createIndexedDBProvider(id, blockSuiteWorkspace.doc);
const persistence = createIndexedDBProvider(blockSuiteWorkspace.doc);
persistence.connect();
await persistence.whenSynced.then(() => {
persistence.disconnect();

View File

@@ -82,10 +82,7 @@ const createAffineWebSocketProvider = (
const createIndexedDBBackgroundProvider = (
blockSuiteWorkspace: BlockSuiteWorkspace
): LocalIndexedDBBackgroundProvider => {
const indexeddbProvider = create(
blockSuiteWorkspace.id,
blockSuiteWorkspace.doc
);
const indexeddbProvider = create(blockSuiteWorkspace.doc);
const callbacks = new CallbackSet();
return {
flavour: 'local-indexeddb-background',