make BasePlatform::setLanguage sync, handle promises internally

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-02-25 10:57:41 +00:00
parent 5117efaf98
commit af0b57bcda

View File

@ -386,7 +386,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
return this.eventIndexManager;
}
async setLanguage(preferredLangs: string[]): Promise<void> {
return this._ipcCall('setLanguage', preferredLangs);
setLanguage(preferredLangs: string[]) {
this._ipcCall('setLanguage', preferredLangs).catch(error => {
console.log("Failed to send setLanguage IPC to Electron");
console.error(error);
});
}
}