forked from matrix/element-web
make BasePlatform::setLanguage sync, handle promises internally
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
5117efaf98
commit
af0b57bcda
|
@ -386,7 +386,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return this.eventIndexManager;
|
return this.eventIndexManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
async setLanguage(preferredLangs: string[]): Promise<void> {
|
setLanguage(preferredLangs: string[]) {
|
||||||
return this._ipcCall('setLanguage', preferredLangs);
|
this._ipcCall('setLanguage', preferredLangs).catch(error => {
|
||||||
|
console.log("Failed to send setLanguage IPC to Electron");
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue