diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 653870870..a73e4e0a8 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -27,7 +27,8 @@ "textStatistic": "Statistic", "textLastModifiedBy": "Last Modified By", "textLastModified": "Last Modified", - "textApplication": "Application" + "textApplication": "Application", + "textLoading": "Loading..." }, "Collaboration": { "textEditUser": "Users who are editing the file:" diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index a4759e81e..06c1d4164 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -254,7 +254,7 @@ class MainController extends Component { }); this.api.asc_registerCallback("asc_onGetDocInfoStop", () => { - console.log("End"); + console.log("Stop"); storeDocumentInfo.switchIsLoaded(true); }); @@ -262,7 +262,11 @@ class MainController extends Component { storeDocumentInfo.changeCount(obj); }); - // me.api.asc_registerCallback('asc_onGetDocInfoEnd', _.bind(me.onApiGetDocInfoEnd, me)); + this.api.asc_registerCallback('asc_onGetDocInfoEnd', () => { + console.log('End'); + storeDocumentInfo.switchIsLoaded(true); + }); + // me.api.asc_registerCallback('asc_onDocumentName', _.bind(me.onApiDocumentName, me)); } diff --git a/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx b/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx index 2f3bdc9ce..63c1ecc38 100644 --- a/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx +++ b/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx @@ -19,61 +19,53 @@ const PageDocumentInfo = (props) => { } = storeInfo.infoObj; const dataDoc = JSON.parse(JSON.stringify(storeInfo.dataDoc)); const isLoaded = storeInfo.isLoaded; - - if (!isLoaded) { - console.log( - pageCount, - paragraphCount, - symbolsCount, - symbolsWSCount, - wordsCount + console.log(pageCount, paragraphCount, symbolsCount, symbolsWSCount, wordsCount); + + return ( + + + {_t.textDocumentTitle} + + + + {_t.textOwner} + + + + {_t.textUploaded} + + + + {_t.textStatistic} + + + + + + + + {dataModified && dataModifiedBy ? ( + + {_t.textLastModified} + + + + {_t.textLastModifiedBy} + + + + + ) : null} + {dataApp ? ( + + {_t.textApplication} + + + + + ) : null} + ); - return ( - - - {_t.textDocumentTitle} - - - - {_t.textOwner} - - - - {_t.textUploaded} - - - - {_t.textStatistic} - - - - - - - - {dataModified && dataModifiedBy ? ( - - {_t.textLastModified} - - - - {_t.textLastModifiedBy} - - - - - ) : null} - {dataApp ? ( - - {_t.textApplication} - - - - - ) : null} - - ); - } }; const DocumentInfo = inject("storeDocumentInfo")(observer(PageDocumentInfo));