summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2023-04-14 13:31:06 +0200
committerOskar Nyberg <oskar@mullvad.net>2023-04-17 13:13:40 +0200
commitebfb8cf5fd090a561f8907b7f27d7d29b523a48c (patch)
tree566ea25a91228afbadeb080a7a5c799c151db407 /gui/src
parentc7294cd2cb88c9a4ba26240bcf042933f42dfb29 (diff)
downloadmullvadvpn-ebfb8cf5fd090a561f8907b7f27d7d29b523a48c.tar.xz
mullvadvpn-ebfb8cf5fd090a561f8907b7f27d7d29b523a48c.zip
Prevent close handler when closing notifications in category
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/notification-controller.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/src/main/notification-controller.ts b/gui/src/main/notification-controller.ts
index 6fbe6d4f19..cbc1afd66b 100644
--- a/gui/src/main/notification-controller.ts
+++ b/gui/src/main/notification-controller.ts
@@ -130,7 +130,9 @@ export default class NotificationController {
) {
this.activeNotifications.forEach((notification) => {
if (notification.specification.category === category) {
+ notification.notification.removeAllListeners('close');
notification.notification.close();
+ this.activeNotifications.delete(notification);
}
});
this.dismissedNotifications.forEach((notification) => {
@@ -248,7 +250,7 @@ export default class NotificationController {
private addActiveNotification(notification: Notification) {
notification.notification.on('close', () => {
- this.dismissedNotifications.add({ ...notification.specification });
+ this.dismissedNotifications.add(notification.specification);
this.activeNotifications.delete(notification);
this.updateNotificationIcon();
});