Cleanup
This commit is contained in:
parent
44a363f188
commit
3c2bb6e4f6
3 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) => {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue