diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index aa1f50825..445543b3f 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -658,7 +658,9 @@ class MainController extends Component { const storeDocumentInfo = this.props.storeDocumentInfo; this.api.asc_registerCallback("asc_onGetDocInfoStart", () => { - storeDocumentInfo.switchIsLoaded(false); + this.timerLoading = setTimeout(() => { + storeDocumentInfo.switchIsLoaded(false); + }, 2000); }); this.api.asc_registerCallback("asc_onGetDocInfoStop", () => { @@ -666,11 +668,21 @@ class MainController extends Component { }); this.api.asc_registerCallback("asc_onDocInfo", (obj) => { - storeDocumentInfo.changeCount(obj); + this.objectInfo = obj; + if(!this.timerDocInfo) { + this.timerDocInfo = setInterval(() => { + storeDocumentInfo.changeCount(this.objectInfo); + }, 300); + storeDocumentInfo.changeCount(this.objectInfo); + } + + clearTimeout(this.timerLoading); }); this.api.asc_registerCallback('asc_onGetDocInfoEnd', () => { storeDocumentInfo.switchIsLoaded(true); + clearTimeout(this.timerLoading); + clearInterval(this.timerDocInfo); }); // Color Schemes diff --git a/apps/documenteditor/mobile/src/store/documentInfo.js b/apps/documenteditor/mobile/src/store/documentInfo.js index 3bfa67356..d57b4b90c 100644 --- a/apps/documenteditor/mobile/src/store/documentInfo.js +++ b/apps/documenteditor/mobile/src/store/documentInfo.js @@ -20,7 +20,7 @@ export class storeDocumentInfo { symbolsWSCount: 0, }; - isLoaded = false; + isLoaded = true; dataDoc; switchIsLoaded(value) {