mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
feat(core): add resetSync button (#10404)
This commit is contained in:
@@ -222,6 +222,10 @@ class WorkerDocSync implements DocSync {
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
}
|
||||
|
||||
resetSync(): Promise<void> {
|
||||
return this.client.call('docSync.resetSync');
|
||||
}
|
||||
}
|
||||
|
||||
class WorkerBlobSync implements BlobSync {
|
||||
|
||||
@@ -231,6 +231,7 @@ class StoreConsumer {
|
||||
const undo = this.docSync.addPriority(docId, priority);
|
||||
return () => undo();
|
||||
}),
|
||||
'docSync.resetSync': () => this.docSync.resetSync(),
|
||||
'blobSync.downloadBlob': key => this.blobSync.downloadBlob(key),
|
||||
'blobSync.uploadBlob': blob => this.blobSync.uploadBlob(blob),
|
||||
'blobSync.fullSync': () =>
|
||||
|
||||
@@ -81,6 +81,7 @@ interface GroupedWorkerOps {
|
||||
state: [void, DocSyncState];
|
||||
docState: [string, DocSyncDocState];
|
||||
addPriority: [{ docId: string; priority: number }, boolean];
|
||||
resetSync: [void, void];
|
||||
};
|
||||
|
||||
blobSync: {
|
||||
|
||||
Reference in New Issue
Block a user