Skip to content

Commit

Permalink
Fix exit app on download tts acepted
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Oct 12, 2023
1 parent c75046a commit 957426c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Settings/Language/Language.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,19 @@ export class LanguageContainer extends Component {
onDialogAcepted = downloadingLangData => {
const { marketId, lang, ttsName, continueOnline } = downloadingLangData;
this.setState({ openDialog: { open: false, downloadingLangData: {} } });
onAndroidPause(() => this.pauseCallback());
const downloadingLangState = {
isdownloading: true,
isDiferentTts: false,
engineName: ttsName,
marketId: marketId,
selectedLang: lang
selectedLang: lang,
firstClick: false,
continueOnline: false
};
this.props.setDownloadingLang(downloadingLangState);
if (continueOnline) this.handleSubmit(lang);
window.cordova.plugins.market.open(marketId);
navigator.app.exitApp();
};

onCloseDialog = () => {
Expand Down

0 comments on commit 957426c

Please sign in to comment.