mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-06 14:38:21 +00:00
Prevent erroneously setting state outside of settings window
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user