Update CleanRemoteNotesProcessorService.ts
This commit is contained in:
parent
6fff29abb2
commit
fd15a90b77
|
@ -67,6 +67,8 @@ export class CleanRemoteNotesProcessorService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await this.notesRepository.delete(notes.map(note => note.id));
|
||||||
|
|
||||||
for (const note of notes) {
|
for (const note of notes) {
|
||||||
const t = this.idService.parse(note.id).date.getTime();
|
const t = this.idService.parse(note.id).date.getTime();
|
||||||
if (stats.oldest === null || t < stats.oldest) {
|
if (stats.oldest === null || t < stats.oldest) {
|
||||||
|
@ -77,8 +79,6 @@ export class CleanRemoteNotesProcessorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.notesRepository.delete(notes.map(note => note.id));
|
|
||||||
|
|
||||||
cursor = notes.at(-1)?.id ?? null;
|
cursor = notes.at(-1)?.id ?? null;
|
||||||
|
|
||||||
stats.deletedCount += notes.length;
|
stats.deletedCount += notes.length;
|
||||||
|
|
Loading…
Reference in New Issue