fix excluded pages

This commit is contained in:
Dan Percic 2022-02-01 11:40:05 +02:00
parent 991e6a1b1c
commit cf72dca567

View File

@ -10,6 +10,7 @@ import {
ErrorService,
FilterService,
LoadingService,
log,
NestedFilter,
OnAttach,
OnDetach,
@ -510,12 +511,9 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
}
private async _fileUpdated(file: File): Promise<void> {
const hasBeenProcessed = await firstValueFrom(this.stateService.hasBeenProcessed$);
await this._loadFileData(file);
if (hasBeenProcessed) {
await this._reloadAnnotations();
}
await this._reloadAnnotations();
await this._stampPDF();
}
private _subscribeToFileUpdates(): void {
@ -523,6 +521,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
.watch$(this.dossierId, this.fileId)
.pipe(
filter(f => !!f),
log(),
switchMap(file => this._fileUpdated(file)),
)
.subscribe();