diff --git a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts index 196a3280f..d3b3269b9 100644 --- a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, HostListener, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Event, NavigationEnd, Router } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { AppStateService } from '../../../../state/app-state.service'; import { WebViewerInstance } from '@pdftron/webviewer'; import { PdfViewerComponent } from '../../components/pdf-viewer/pdf-viewer.component'; @@ -47,7 +47,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { public analysisProgress: number; public analysisInterval: number; fileData: FileDataModel; - fileId: string; annotationData: AnnotationData; selectedAnnotations: AnnotationWrapper[]; viewReady = false; @@ -58,7 +57,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { fileReanalysedSubscription: Subscription; hideSkipped = false; public viewDocumentInfo = false; - private projectId: string; private _instance: WebViewerInstance; @ViewChild('fileWorkloadComponent') private _workloadComponent: FileWorkloadComponent; @@ -119,6 +117,14 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { ); // on less than 3 seconds show indeterminate } + get projectId() { + return this.appStateService.activeProjectId; + } + + get fileId() { + return this.appStateService.activeFileId; + } + updateViewMode() { const allAnnotations = this._instance.annotManager.getAnnotationsList();