From d655e79be852c44991bb5935e54259b10d745ef7 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Mon, 28 Mar 2022 15:29:30 +0300 Subject: [PATCH] Update DocumentInfo.jsx --- .../src/controller/settings/DocumentInfo.jsx | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx b/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx index 41e941270..72ef0f16a 100644 --- a/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx @@ -32,12 +32,9 @@ class DocumentInfoController extends Component { value = props.asc_getLastModifiedBy(); if(value) this.docInfoObject.modifyBy = AscCommon.UserInfoParser.getParsedName(value); - value = props.asc_getTitle(); - this.docInfoObject.title = value || ''; - value = props.asc_getSubject(); - this.docInfoObject.subject = value || ''; - value = props.asc_getDescription(); - this.docInfoObject.description = value || ''; + this.docInfoObject.title = props.asc_getTitle() || ''; + this.docInfoObject.subject = props.asc_getSubject() || ''; + this.docInfoObject.description = props.asc_getDescription() || ''; value = props.asc_getCreator(); if(value) this.docInfoObject.creators = value; @@ -117,11 +114,11 @@ class DocumentInfoController extends Component { let appName; if (appProps) { - appName = - (appProps.asc_getApplication() || "") + - (appProps.asc_getAppVersion() ? " " : "") + - (appProps.asc_getAppVersion() || ""); - return appName; + appName = appProps.asc_getApplication(); + if ( appName && appProps.asc_getAppVersion() ) + appName += ` ${appProps.asc_getAppVersion()}`; + + return appName || ''; } else if (this.pdfProps) { appName = this.pdfProps ? this.pdfProps.Producer || '' : ''; return appName; @@ -160,4 +157,4 @@ class DocumentInfoController extends Component { } -export default inject("storeAppOptions")(observer(withTranslation()(DocumentInfoController))); \ No newline at end of file +export default inject("storeAppOptions")(observer(withTranslation()(DocumentInfoController)));