[ADF-4480] Change Viewer behaviour when opening unsupported files (#4922)

* [ADF-4480] Change Viewer behaviour when opening unsuported files

* [ADF-4480] Fix identations

* [ADF-4480] Make timeout of rendition retry constant
This commit is contained in:
arditdomi
2019-07-13 11:35:21 +01:00
committed by Eugenio Romano
parent 18ed4e3c1d
commit dc450a3af2
3 changed files with 9 additions and 3 deletions

View File

@@ -200,6 +200,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
@Output()
invalidSharedLink = new EventEmitter();
TRY_TIMEOUT: number = 2000;
viewerType = 'unknown';
isLoading = false;
nodeEntry: NodeEntry;
@@ -692,8 +694,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
this.viewerType = 'error_in_creation';
return reject();
});
} else {
this.isLoading = false;
this.viewerType = 'error_in_creation';
clearInterval(intervalId);
}
}, 1000);
}, this.TRY_TIMEOUT);
});
}