[ADF-5209] When viewing a previous version, the title is not displayed correctly. (#5926)

* set the file title if the versionId is present.

* test if file title is set when changing the versionId.
This commit is contained in:
Urse Daniel
2020-07-30 12:19:02 +03:00
committed by GitHub
parent 46f3f0f1d1
commit bf7a0902c6
2 changed files with 32 additions and 2 deletions

View File

@@ -389,7 +389,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
this.mimeType = nodeData.content.mimeType;
}
this.fileTitle = this.getDisplayName(nodeData.name);
this.fileTitle = this.getDisplayName(versionData ? versionData.name : nodeData.name);
this.urlFileContent = versionData ? this.apiService.contentApi.getVersionContentUrl(this.nodeId, versionData.id) :
this.apiService.contentApi.getContentUrl(this.nodeId);
this.urlFileContent = this.cacheBusterNumber ? this.urlFileContent + '&' + this.cacheBusterNumber : this.urlFileContent;