diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index 9f4cd17c7..17acb2b39 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -338,30 +338,28 @@ export class FilePreviewScreenComponent } openManualAnnotationDialog(manualRedactionEntryWrapper: ManualRedactionEntryWrapper) { - return this._ngZone.run(() => { - const file = this.state.file(); + const file = this.state.file(); - this._dialogService.openDialog( - 'manualAnnotation', - { manualRedactionEntryWrapper, dossierId: this.dossierId, file }, - (result: { annotations: ManualRedactionEntryWrapper[]; dictionary?: Dictionary }) => { - const selectedAnnotations = this._annotationManager.selected; - if (selectedAnnotations.length > 0) { - this._annotationManager.delete([selectedAnnotations[0].Id]); - } + this._dialogService.openDialog( + 'manualAnnotation', + { manualRedactionEntryWrapper, dossierId: this.dossierId, file }, + (result: { annotations: ManualRedactionEntryWrapper[]; dictionary?: Dictionary }) => { + const selectedAnnotations = this._annotationManager.selected; + if (selectedAnnotations.length > 0) { + this._annotationManager.delete([selectedAnnotations[0].Id]); + } - const add$ = this._manualRedactionService.addAnnotation( - result.annotations.map(w => w.manualRedactionEntry).filter(e => e.positions[0].page <= file.numberOfPages), - this.dossierId, - this.fileId, - result.dictionary?.label, - ); + const add$ = this._manualRedactionService.addAnnotation( + result.annotations.map(w => w.manualRedactionEntry).filter(e => e.positions[0].page <= file.numberOfPages), + this.dossierId, + this.fileId, + result.dictionary?.label, + ); - const addAndReload$ = add$.pipe(switchMap(() => this._filesService.reload(this.dossierId, file))); - return firstValueFrom(addAndReload$.pipe(catchError(() => of(undefined)))); - }, - ); - }); + const addAndReload$ = add$.pipe(switchMap(() => this._filesService.reload(this.dossierId, file))); + return firstValueFrom(addAndReload$.pipe(catchError(() => of(undefined)))); + }, + ); } toggleFullScreen() {