Don't download all documents when initial sync gets interrupted
This commit is contained in:
parent
476588a63b
commit
c10b6435d4
2 changed files with 6 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ export class CoveredValues {
|
|||
this.advanceMinWhilePossible();
|
||||
}
|
||||
|
||||
public add(value: number): void {
|
||||
if (value < this.minValue) {
|
||||
public add(value: number | undefined): void {
|
||||
if (value === undefined || value < this.minValue) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue