Browse Source

make BasePlatform::setLanguage sync, handle promises internally

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/12487/head
Michael Telatynski 2 years ago
parent
commit
af0b57bcda
  1. 7
      src/vector/platform/ElectronPlatform.js

7
src/vector/platform/ElectronPlatform.js

@ -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);
});
}
}

Loading…
Cancel
Save