diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-26 17:53:25 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-06-27 17:38:40 +0200 |
| commit | 729dc6a3b9dd9fca84c355ef4b0c321cd344745b (patch) | |
| tree | faa5a55631a3fc727df37586f6834a1d5d01cbc5 /app/lib | |
| parent | f41f3bbfda0abd6db1ef0ee0eeddd155f41cdb3a (diff) | |
| download | mullvadvpn-729dc6a3b9dd9fca84c355ef4b0c321cd344745b.tar.xz mullvadvpn-729dc6a3b9dd9fca84c355ef4b0c321cd344745b.zip | |
Migrate back to AppActivationState observer from RX
See https://github.com/Microsoft/reactxp/issues/661
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/app-visibility.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/lib/app-visibility.js b/app/lib/app-visibility.js deleted file mode 100644 index d599f6941b..0000000000 --- a/app/lib/app-visibility.js +++ /dev/null @@ -1,28 +0,0 @@ -// @flow -import { ipcRenderer } from 'electron'; - -type EventHandler = (boolean) => any; - -export default class AppVisiblityObserver { - _handler: EventHandler; - - constructor(handler: EventHandler) { - this._handler = handler; - - ipcRenderer.on('show-window', this._handleShowEvent).on('hide-window', this._handleHideEvent); - } - - dispose() { - ipcRenderer - .removeListener('show-window', this._handleShowEvent) - .removeListener('hide-window', this._handleHideEvent); - } - - _handleShowEvent = (_event) => { - this._handler(true); - }; - - _handleHideEvent = (_event) => { - this._handler(false); - }; -} |
