Skip to content

Commit e4b2ada

Browse files
committed
Merge branch 'disconnected-from-daemon-notification-on-suspend-des-723'
2 parents ad1ac09 + f1fa32d commit e4b2ada

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gui/src/main/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class ApplicationMain
470470
const wasConnected = this.daemonRpc.isConnected;
471471
IpcMainEventChannel.navigation.notifyReset?.();
472472
this.daemonRpc.disconnect();
473-
this.onDaemonDisconnected(wasConnected);
473+
this.onDaemonDisconnected(wasConnected, undefined, true);
474474
};
475475

476476
private onResume = () => {
@@ -620,7 +620,7 @@ class ApplicationMain
620620
}
621621
};
622622

623-
private onDaemonDisconnected = (wasConnected: boolean, error?: Error) => {
623+
private onDaemonDisconnected = (wasConnected: boolean, error?: Error, planned?: boolean) => {
624624
if (this.daemonEventListener) {
625625
this.daemonRpc.unsubscribeDaemonEventListener(this.daemonEventListener);
626626
}
@@ -631,7 +631,7 @@ class ApplicationMain
631631
SystemNotificationCategory.tunnelState,
632632
);
633633

634-
if (this.tunnelState.tunnelState.state !== 'disconnected') {
634+
if (this.tunnelState.tunnelState.state !== 'disconnected' && !planned) {
635635
this.notificationController.notifyDaemonDisconnected(
636636
this.userInterface?.isWindowVisible() ?? false,
637637
this.settings.gui.enableSystemNotifications,

0 commit comments

Comments
 (0)