mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 13:02:21 +08:00
fix(core): fix ios sync (#9782)
This commit is contained in:
@@ -75,6 +75,9 @@ export class WorkerConsumer {
|
|||||||
local: new SpaceStorage(
|
local: new SpaceStorage(
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
Object.entries(init.local).map(([type, opt]) => {
|
Object.entries(init.local).map(([type, opt]) => {
|
||||||
|
if (opt === undefined) {
|
||||||
|
return [type, undefined];
|
||||||
|
}
|
||||||
const Storage = this.availableStorageImplementations.find(
|
const Storage = this.availableStorageImplementations.find(
|
||||||
impl => impl.identifier === opt.name
|
impl => impl.identifier === opt.name
|
||||||
);
|
);
|
||||||
@@ -92,6 +95,9 @@ export class WorkerConsumer {
|
|||||||
new SpaceStorage(
|
new SpaceStorage(
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
Object.entries(opts).map(([type, opt]) => {
|
Object.entries(opts).map(([type, opt]) => {
|
||||||
|
if (opt === undefined) {
|
||||||
|
return [type, undefined];
|
||||||
|
}
|
||||||
const Storage = this.availableStorageImplementations.find(
|
const Storage = this.availableStorageImplementations.find(
|
||||||
impl => impl.identifier === opt.name
|
impl => impl.identifier === opt.name
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export interface NbStorePlugin {
|
|||||||
permanently: boolean;
|
permanently: boolean;
|
||||||
}) => Promise<void>;
|
}) => Promise<void>;
|
||||||
releaseBlobs: (options: { id: string }) => Promise<void>;
|
releaseBlobs: (options: { id: string }) => Promise<void>;
|
||||||
listBlobs: (options: { id: string }) => Promise<Array<ListedBlob>>;
|
listBlobs: (options: { id: string }) => Promise<{ blobs: Array<ListedBlob> }>;
|
||||||
getPeerRemoteClocks: (options: {
|
getPeerRemoteClocks: (options: {
|
||||||
id: string;
|
id: string;
|
||||||
peer: string;
|
peer: string;
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
|
|||||||
const listed = await NbStore.listBlobs({
|
const listed = await NbStore.listBlobs({
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
return listed.map(b => ({
|
return listed.blobs.map(b => ({
|
||||||
key: b.key,
|
key: b.key,
|
||||||
mime: b.mime,
|
mime: b.mime,
|
||||||
size: b.size,
|
size: b.size,
|
||||||
|
|||||||
Reference in New Issue
Block a user