From 981eb0fd9fe89044a79bdd9bdd8991506ed816e2 Mon Sep 17 00:00:00 2001 From: Glax Date: Mon, 23 Sep 2024 15:40:43 +0200 Subject: [PATCH] Fix notification batching: Do not resend old notifications. --- Tranga/NotificationConnectors/NotificationConnector.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tranga/NotificationConnectors/NotificationConnector.cs b/Tranga/NotificationConnectors/NotificationConnector.cs index 2414fb4..f64da82 100644 --- a/Tranga/NotificationConnectors/NotificationConnector.cs +++ b/Tranga/NotificationConnectors/NotificationConnector.cs @@ -35,6 +35,7 @@ public abstract class NotificationConnector : GlobalBase SendNotificationInternal($"{ut} ({texts.Length})", string.Join('\n', texts)); } _notificationRequested = null; + _notifications.Clear(); } Thread.Sleep(100); } @@ -61,6 +62,7 @@ public abstract class NotificationConnector : GlobalBase SendNotificationInternal(ut, string.Join('\n', texts)); } _notificationRequested = null; + _notifications.Clear(); } else if(_notificationRequested is not null) {