pass dispatcher through to electron, on a whitelist basis
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a9b5282ba3
commit
755c66b9f1
1 changed files with 12 additions and 0 deletions
|
@ -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 {
|
export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
dis.register(_onAction);
|
||||||
|
}
|
||||||
|
|
||||||
setNotificationCount(count: number) {
|
setNotificationCount(count: number) {
|
||||||
if (this.notificationCount === count) return;
|
if (this.notificationCount === count) return;
|
||||||
super.setNotificationCount(count);
|
super.setNotificationCount(count);
|
||||||
|
|
Loading…
Reference in a new issue