[DE SSE mobile] Fix Bug 52338, Fix Bug 52336

This commit is contained in:
SergeyEzhin 2021-09-03 16:37:48 +03:00
parent a68e99b1bd
commit 605c204bee
2 changed files with 7 additions and 5 deletions

View file

@ -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);

View file

@ -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));
}
}