diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-12-01 15:56:29 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-02-09 10:39:26 +0100 |
| commit | ce3491683323f7187ca89c0b8b1f1727f96e4dfa (patch) | |
| tree | ec7498105c7ad01ca2eb07830d36079d068e4f0e /gui/src | |
| parent | ed97852d98976ced51bcd46650e7a465d6b3101f (diff) | |
| download | mullvadvpn-ce3491683323f7187ca89c0b8b1f1727f96e4dfa.tar.xz mullvadvpn-ce3491683323f7187ca89c0b8b1f1727f96e4dfa.zip | |
Remove closedNotifications list
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/notification-controller.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts index 9c75b68629..4acd988a23 100644 --- a/gui/src/main/notification-controller.ts +++ b/gui/src/main/notification-controller.ts @@ -39,7 +39,6 @@ export default class NotificationController { private reconnecting = false; private presentedNotifications: { [key: string]: boolean } = {}; private activeNotifications: Set<Notification> = new Set(); - private closedNotifications: Set<Notification> = new Set(); private throttledNotifications: Map<SystemNotification, Scheduler> = new Map(); private notificationTitle = process.platform === 'linux' ? app.name : ''; private notificationIcon?: NativeImage; @@ -208,15 +207,10 @@ export default class NotificationController { } private addActiveNotification(notification: Notification) { - notification.notification.on('close', () => this.removeActiveNotification(notification)); + notification.notification.on('close', () => this.activeNotifications.delete(notification)); this.activeNotifications.add(notification); } - private removeActiveNotification(notification: Notification) { - this.activeNotifications.delete(notification); - this.closedNotifications.add(notification); - } - private evaluateNotification( notification: SystemNotification, isWindowVisible: boolean, |
