pass dispatcher through to electron, on a whitelist basis

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/3992/head
Michael Telatynski 2017-05-22 18:30:45 +01:00
parent a9b5282ba3
commit 755c66b9f1
1 changed files with 12 additions and 0 deletions

View File

@ -54,7 +54,19 @@ function platformFriendlyName(): string {
}
}
function _onAction(payload: Object) {
// Whitelist payload actions, no point sending most across
if (['call_state'].includes(payload.action)) {
ipcRenderer.send('app_onAction', payload);
}
}
export default class ElectronPlatform extends VectorBasePlatform {
constructor() {
super();
dis.register(_onAction);
}
setNotificationCount(count: number) {
if (this.notificationCount === count) return;
super.setNotificationCount(count);