This commit is contained in:
Andras Schmelczer 2026-04-21 20:01:28 +01:00
parent 5ec523234b
commit 9183f30b5d
14 changed files with 86 additions and 16 deletions

View file

@ -45,7 +45,7 @@ export async function scheduleOfflineChanges(
const allDocuments = new Map(queue.allSettledDocuments());
const locallyRenamedPaths = enqueueRenamedDocuments(deps, allDocuments);
let deletedCandidates = await findLocallyDeletedFiles(operations, allDocuments);
const deletedCandidates = await findLocallyDeletedFiles(operations, allDocuments);
const instructions = await buildSyncInstructions(
deps,

View file

@ -197,7 +197,7 @@ export class SyncEventQueue {
e.documentId === docId) ||
(e.type === SyncEventType.SyncRemote &&
// we care about the local path not the remote
this.getDocumentByDocumentId(e.remoteVersion.documentId as DocumentId)?.path === path)
this.getDocumentByDocumentId(e.remoteVersion.documentId)?.path === path)
);
}

View file

@ -199,9 +199,9 @@ export class Syncer {
private async internalScheduleSyncForOfflineChanges(): Promise<void> {
await scheduleOfflineChanges(
{ logger: this.logger, operations: this.operations, queue: this.queue },
(path) => this.syncLocallyCreatedFile(path),
(args) => this.syncLocallyUpdatedFile(args),
(path) => this.syncLocallyDeletedFile(path),
(path) => { this.syncLocallyCreatedFile(path); },
(args) => { this.syncLocallyUpdatedFile(args); },
(path) => { this.syncLocallyDeletedFile(path); },
);
await this.scheduleDrain();