Skip to content

Commit

Permalink
Merge branch 'disconnected-from-daemon-notification-on-suspend-des-723'
Browse files Browse the repository at this point in the history
  • Loading branch information
raksooo committed Apr 2, 2024
2 parents ad1ac09 + f1fa32d commit e4b2ada
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -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);
}
Expand All @@ -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,
Expand Down

0 comments on commit e4b2ada

Please sign in to comment.