summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2023-04-17 13:13:54 +0200
committerOskar Nyberg <oskar@mullvad.net>2023-04-17 13:13:54 +0200
commit290ad7672272f34529afcd80a79f56fc38b340f6 (patch)
tree566ea25a91228afbadeb080a7a5c799c151db407
parentc7294cd2cb88c9a4ba26240bcf042933f42dfb29 (diff)
parentebfb8cf5fd090a561f8907b7f27d7d29b523a48c (diff)
downloadmullvadvpn-290ad7672272f34529afcd80a79f56fc38b340f6.tar.xz
mullvadvpn-290ad7672272f34529afcd80a79f56fc38b340f6.zip
Merge branch 'notification-dot-still-visible-after-des-147'
-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();
});