diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-10-09 18:44:38 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-10-11 09:43:16 +0200 |
| commit | dd14ec08bf6d7abe59c4bfd27b73217b7fa30202 (patch) | |
| tree | de1043fdc63973d3ff03433766e8e5499a72a48a /gui/src | |
| parent | 7d3390b0dce9b1cd7c946856e9e23fe2e7b7a28d (diff) | |
| download | mullvadvpn-dd14ec08bf6d7abe59c4bfd27b73217b7fa30202.tar.xz mullvadvpn-dd14ec08bf6d7abe59c4bfd27b73217b7fa30202.zip | |
Register power monitor listeners after ready
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index c674ca22d8..da3d677cc0 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -183,7 +183,6 @@ class ApplicationMain ); }); - app.on('activate', this.onActivate); app.on('ready', this.onReady); app.on('before-quit', this.onBeforeQuit); @@ -195,9 +194,6 @@ class ApplicationMain log.info('quit received'); this.onQuit(); }); - - powerMonitor.on('suspend', this.onSuspend); - powerMonitor.on('resume', this.onResume); } public async performPostUpgradeCheck(): Promise<void> { @@ -368,6 +364,10 @@ class ApplicationMain } private onReady = async () => { + app.on('activate', this.onActivate); + powerMonitor.on('suspend', this.onSuspend); + powerMonitor.on('resume', this.onResume); + // Disable built-in DNS resolver. app.configureHostResolver({ enableBuiltInResolver: false, |
