diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 4865fb0e9..04c03321a 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -688,7 +688,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onGetDocInfoEnd', () => { clearTimeout(this.timerLoading); clearInterval(this.timerDocInfo); - storeDocumentInfo.switchIsLoaded(true); + storeDocumentInfo.changeCount(this.objectInfo); }); // Color Schemes diff --git a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx index 1b991fc32..5a836adef 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx @@ -222,6 +222,7 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu case Asc.c_oAscError.ID.DataValidate: errData && errData.asc_getErrorTitle() && (config.title = Common.Utils.String.htmlEncode(errData.asc_getErrorTitle())); + config.buttons = ['OK', 'Cancel']; config.msg = errData && errData.asc_getError() ? Common.Utils.String.htmlEncode(errData.asc_getError()) : _t.errorDataValidate; break; @@ -350,8 +351,9 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu Common.Gateway.reportWarning(id, config.msg); config.title = config.title || _t.notcriticalErrorTitle; - config.callback = (btn) => { - if (id == Asc.c_oAscError.ID.DataValidate) { + config.buttons = config.buttons || ['OK']; + config.callback = (_, btn) => { + if (id == Asc.c_oAscError.ID.DataValidate && btn.target.textContent !== 'OK') { api.asc_closeCellEditor(true); } storeAppOptions.changeEditingRights(false); @@ -362,12 +364,12 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu cssClass: 'error-dialog', title : config.title, text : config.msg, - buttons: [ + buttons: config.buttons.map( button => ( { - text: 'OK', - onClick: () => config.callback + text:button, + onClick: (_, btn) => config.callback(_, btn) } - ] + )) }).open(); Common.component.Analytics.trackEvent('Internal Error', id.toString());