redraw current page only of not already procexxing

This commit is contained in:
Timo Bejan 2022-01-11 17:30:43 +02:00
parent 94e79831e7
commit fb1ad24cb6

View File

@ -561,9 +561,15 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
}
private async _reloadAnnotationsForPage(page: number) {
const currentPageAnnotations = this.visibleAnnotations.filter(a => a.pageNumber === page);
this.fileData.file = await this._filesService.reload(this.dossierId, this.fileId).toPromise();
// if this action triggered a re-processing,
// we don't want to redraw for this page since they will get redrawn as soon as processing ends;
if (this.fileData.file.isProcessing) {
return;
}
const currentPageAnnotations = this.visibleAnnotations.filter(a => a.pageNumber === page);
this.fileData.redactionLog = await this._fileDownloadService.loadRedactionLogFor(this.dossierId, this.fileId).toPromise();
await this._cleanupAndRedrawAnnotations(currentPageAnnotations, annotation => annotation.pageNumber === page);