pull/21833/head
Šimon Brandner 2020-12-01 20:17:24 +01:00
parent 44a363f188
commit 3c2bb6e4f6
3 changed files with 4 additions and 5 deletions

View File

@ -237,6 +237,8 @@ export default abstract class BasePlatform {
setLanguage(preferredLangs: string[]) {}
setSpellCheckLanguages(preferredLangs: string[]) {}
getAvailableSpellCheckLanguages(): Promise<string[]> | null {
return null;
}

View File

@ -188,10 +188,7 @@ export default class GeneralUserSettingsTab extends React.Component {
SettingsStore.setValue("spell-check-languages", null, SettingLevel.DEVICE, languages);
this.setState({spellCheckLanguages: languages})
const plaf = PlatformPeg.get();
if (plaf) {
plaf.setLanguage(languages);
}
languageHandler.setSpellCheckLanguages(languages);
};
_onPasswordChangeError = (err) => {

View File

@ -349,7 +349,7 @@ export function setLanguage(preferredLangs: string | string[]) {
export function setSpellCheckLanguages(preferredLangs: string[]) {
const plaf = PlatformPeg.get();
if (plaf) {
plaf.setLanguage(preferredLangs);
plaf.setSpellCheckLanguages(preferredLangs);
}
}