Prevent erroneously setting state outside of settings window

This commit is contained in:
Andrew Morgan 2019-03-07 16:26:53 +00:00
parent 012ad9ef56
commit 94b6396e0c
1 changed files with 6 additions and 2 deletions

View File

@ -266,7 +266,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
onKeypress(self: any, callback: (ev, event) => void) {
ipcRenderer.on('keypress', callback.bind(self));
ipcRenderer.on('keypress', callback);
}
removeOnKeypress(self: any, callback: (ev, event) => void) {
ipcRenderer.removeListener('keypress', callback);
}
onWindowBlurred(callback: () => void) {