diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx index 27c6678ee..88c2a7fb3 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx @@ -25,6 +25,7 @@ class DownloadController extends Component { const _t = t("Settings", { returnObjects: true }); if(format) { + this.closeModal(); if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) { f7.dialog.create({ title: _t.notcriticalErrorTitle, @@ -37,8 +38,8 @@ class DownloadController extends Component { text: _t.textOk, onClick: () => { if (format == Asc.c_oAscFileType.TXT) { - const isDocReady = this.props.storeAppOptions.isDocReady; - onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.TXT, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, isDocReady); + const advOptions = api.asc_getAdvancedOptions(); + Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.TXT, advOptions, 2, new Asc.asc_CDownloadOptions(format)); } else { setTimeout(() => { @@ -51,7 +52,6 @@ class DownloadController extends Component { }).open(); } else { - this.closeModal(); setTimeout(() => { api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); }, 400); diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx index 2d10d41f8..5bd3dbf81 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Download.jsx @@ -25,6 +25,7 @@ class DownloadController extends Component { const _t = t("View.Settings", {returnObjects: true}); if (format) { + this.closeModal(); if (format == Asc.c_oAscFileType.CSV) { f7.dialog.create({ title: _t.notcriticalErrorTitle, @@ -36,13 +37,14 @@ class DownloadController extends Component { { text: _t.textOk, onClick: () => { - onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.CSV, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, true); + const advOptions = api.asc_getAdvancedOptions(); + Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.CSV, advOptions, 2, new Asc.asc_CDownloadOptions(format)) + // onAdvancedOptions(Asc.c_oAscAdvancedOptionsID.CSV, api.asc_getAdvancedOptions(), 2, new Asc.asc_CDownloadOptions(format), _t, true); } } ] }).open(); } else { - this.closeModal(); api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); } }