summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2024-04-02 11:04:21 +0200
committerOskar Nyberg <oskar@mullvad.net>2024-04-02 16:23:32 +0200
commitf1fa32d0fb1e932a22492586ffc3f9b387f22153 (patch)
treebeda3308678e1e00b8aa5b2335d2a08f0f603560 /gui/src
parentad1ac09d4d4ebf9e307d923b41155c1014a829c1 (diff)
downloadmullvadvpn-f1fa32d0fb1e932a22492586ffc3f9b387f22153.tar.xz
mullvadvpn-f1fa32d0fb1e932a22492586ffc3f9b387f22153.zip
Prevent disconnected from daemon notification on suspend
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 59f81141cd..a844655388 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -470,7 +470,7 @@ class ApplicationMain
const wasConnected = this.daemonRpc.isConnected;
IpcMainEventChannel.navigation.notifyReset?.();
this.daemonRpc.disconnect();
- this.onDaemonDisconnected(wasConnected);
+ this.onDaemonDisconnected(wasConnected, undefined, true);
};
private onResume = () => {
@@ -620,7 +620,7 @@ class ApplicationMain
}
};
- private onDaemonDisconnected = (wasConnected: boolean, error?: Error) => {
+ private onDaemonDisconnected = (wasConnected: boolean, error?: Error, planned?: boolean) => {
if (this.daemonEventListener) {
this.daemonRpc.unsubscribeDaemonEventListener(this.daemonEventListener);
}
@@ -631,7 +631,7 @@ class ApplicationMain
SystemNotificationCategory.tunnelState,
);
- if (this.tunnelState.tunnelState.state !== 'disconnected') {
+ if (this.tunnelState.tunnelState.state !== 'disconnected' && !planned) {
this.notificationController.notifyDaemonDisconnected(
this.userInterface?.isWindowVisible() ?? false,
this.settings.gui.enableSystemNotifications,