Skip to content

Commit b5c32c9

Browse files
committed
Close notifications in some situations where they should be closed
1 parent 7c0baef commit b5c32c9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

gui/src/main/account.ts

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ export default class Account {
120120
}
121121

122122
public handleDeviceEvent(deviceEvent: DeviceEvent) {
123+
this.delegate.closeNotificationsInCategory(SystemNotificationCategory.expiry);
124+
123125
this.deviceStateValue = deviceEvent.deviceState;
124126

125127
switch (deviceEvent.deviceState.type) {

gui/src/main/index.ts

+8
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,10 @@ class ApplicationMain
487487

488488
log.info('Connected to the daemon');
489489

490+
this.notificationController.closeNotificationsInCategory(
491+
SystemNotificationCategory.tunnelState,
492+
);
493+
490494
// subscribe to events
491495
try {
492496
this.daemonEventListener = this.subscribeEvents();
@@ -623,6 +627,10 @@ class ApplicationMain
623627
// Reset the daemon event listener since it's going to be invalidated on disconnect
624628
this.daemonEventListener = undefined;
625629

630+
this.notificationController.closeNotificationsInCategory(
631+
SystemNotificationCategory.tunnelState,
632+
);
633+
626634
if (this.tunnelState.tunnelState.state !== 'disconnected') {
627635
this.notificationController.notifyDaemonDisconnected(
628636
this.userInterface?.isWindowVisible() ?? false,

0 commit comments

Comments
 (0)