forked from matrix/element-web
Prevent erroneously setting state outside of settings window
This commit is contained in:
parent
012ad9ef56
commit
94b6396e0c
|
@ -265,8 +265,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
ipcRenderer.send('stop-listening-keys');
|
ipcRenderer.send('stop-listening-keys');
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeypress(self: any, callback: (ev, event) => void ) {
|
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) {
|
onWindowBlurred(callback: () => void) {
|
||||||
|
|
Loading…
Reference in New Issue