mirror of https://github.com/vector-im/riot-web
Broadcast language change to ElectroPlatform
parent
65d55bd0d9
commit
8f1ea84eb6
|
@ -258,7 +258,9 @@ export default abstract class BasePlatform {
|
|||
return null;
|
||||
}
|
||||
|
||||
setLanguage(preferredLangs: string[]) {}
|
||||
async setLanguage(language: string) {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
setSpellCheckLanguages(preferredLangs: string[]) {}
|
||||
|
||||
|
|
|
@ -192,7 +192,11 @@ export default class GeneralUserSettingsTab extends React.Component {
|
|||
|
||||
SettingsStore.setValue("language", null, SettingLevel.DEVICE, newLanguage);
|
||||
this.setState({language: newLanguage});
|
||||
PlatformPeg.get().reload();
|
||||
const platform = PlatformPeg.get();
|
||||
if (platform) {
|
||||
platform.reload();
|
||||
platform.setLanguage(newLanguage);
|
||||
}
|
||||
};
|
||||
|
||||
_onSpellCheckLanguagesChange = (languages) => {
|
||||
|
|
Loading…
Reference in New Issue