mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
feat: binary export
This commit is contained in:
@@ -78,7 +78,10 @@ export class Database {
|
||||
}
|
||||
|
||||
async getDatabase(workspace: string, options?: BlockInitOptions) {
|
||||
const db = await _getBlockDatabase(workspace, options);
|
||||
const db = await _getBlockDatabase(workspace, {
|
||||
...this.#options,
|
||||
...options,
|
||||
});
|
||||
return db;
|
||||
}
|
||||
|
||||
@@ -87,7 +90,7 @@ export class Database {
|
||||
name: string,
|
||||
listener: (connectivity: Connectivity) => void
|
||||
) {
|
||||
const db = await _getBlockDatabase(workspace);
|
||||
const db = await _getBlockDatabase(workspace, this.#options);
|
||||
return db.addConnectivityListener(name, state => {
|
||||
const connectivity = state.get(name);
|
||||
if (connectivity) listener(connectivity);
|
||||
|
||||
Reference in New Issue
Block a user