This commit is contained in:
Š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[]) {} setLanguage(preferredLangs: string[]) {}
setSpellCheckLanguages(preferredLangs: string[]) {}
getAvailableSpellCheckLanguages(): Promise<string[]> | null { getAvailableSpellCheckLanguages(): Promise<string[]> | null {
return 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); SettingsStore.setValue("spell-check-languages", null, SettingLevel.DEVICE, languages);
this.setState({spellCheckLanguages: languages}) this.setState({spellCheckLanguages: languages})
const plaf = PlatformPeg.get(); languageHandler.setSpellCheckLanguages(languages);
if (plaf) {
plaf.setLanguage(languages);
}
}; };
_onPasswordChangeError = (err) => { _onPasswordChangeError = (err) => {

View file

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