Don't download all documents when initial sync gets interrupted

This commit is contained in:
Andras Schmelczer 2025-11-27 21:52:05 +00:00
parent 170183e308
commit 159c4704de
2 changed files with 6 additions and 2 deletions

View file

@ -75,6 +75,10 @@ export class Database {
Math.max(0, lastSeenUpdateId ?? 0) // the first updateId will be 1 which is the first integer after -1
);
this.documents.forEach((doc) =>
this.lastSeenUpdateIds.add(doc.metadata?.parentVersionId)
);
this.hasInitialSyncCompleted =
initialState.hasInitialSyncCompleted ?? false;
this.logger.debug(