RED-3012: Only app loading indicator in file preview
This commit is contained in:
parent
e103418ea6
commit
f46a911470
@ -79,6 +79,7 @@
|
||||
*ngIf="displayPdfViewer"
|
||||
[annotations]="annotations"
|
||||
[canPerformActions]="canPerformAnnotationActions$ | async"
|
||||
[class.hidden]="!ready"
|
||||
[dossier]="dossier"
|
||||
[fileData]="fileData?.fileData"
|
||||
[file]="file"
|
||||
|
||||
@ -62,3 +62,7 @@
|
||||
max-width: 400px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
redaction-pdf-viewer.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@ -84,6 +84,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
readonly viewDocumentInfo$: Observable<boolean>;
|
||||
readonly file$: Observable<File>;
|
||||
readonly fileId: string;
|
||||
ready = false;
|
||||
private _instance: WebViewerInstance;
|
||||
private _lastPage: string;
|
||||
private _reloadFileOnReanalysis = false;
|
||||
@ -225,10 +226,10 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
await this.ngOnInit();
|
||||
this._lastPage = previousRoute.queryParams.page;
|
||||
this._changeDetectorRef.markForCheck();
|
||||
this._loadingService.stop();
|
||||
}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
this.ready = false;
|
||||
this._loadingService.start();
|
||||
await this.userPreferenceService.saveLastOpenedFileForDossier(this.dossierId, this.fileId);
|
||||
this._subscribeToFileUpdates();
|
||||
@ -403,6 +404,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
|
||||
async viewerReady($event: WebViewerInstance) {
|
||||
this._instance = $event;
|
||||
this.ready = true;
|
||||
await this._stampPDF();
|
||||
await this._cleanupAndRedrawManualAnnotations();
|
||||
this._setExcludedPageStyles();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user