From b2f52af296b832bd90f018dab8db7c2ecd4dbce3 Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 24 Feb 2021 18:45:43 +0200 Subject: [PATCH] smart reanalysis --- .../file-preview-screen.component.html | 10 +++------- .../file-preview-screen.component.ts | 6 ++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html index 4bbe4318c..1fff598d8 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html @@ -280,14 +280,10 @@ - +

{{ loadingMessage | translate }}

-
- +
+
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index 6dbf34810..22853dd02 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -119,6 +119,12 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { public analysisProgress: number; public analysisInterval: number; + get indeterminateMode() { + return ( + this.analysisProgress > 100 || this.appStateService.activeFile.analysisDuration < 3 * 1000 // it takes longer than usual - switch to indeterminate + ); // on less than 3 seconds show indeterminate + } + @ViewChild(PdfViewerComponent) private _viewerComponent: PdfViewerComponent; @ViewChild('annotationsElement') private _annotationsElement: ElementRef; @ViewChild('quickNavigation') private _quickNavigationElement: ElementRef;