From fcdbd32872a9c75010218a9e9c6cf694f25208ed Mon Sep 17 00:00:00 2001 From: Glax Date: Sun, 22 Sep 2024 00:09:45 +0200 Subject: [PATCH] Include amount of notifications of type in title --- Tranga/NotificationConnectors/NotificationConnector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/NotificationConnectors/NotificationConnector.cs b/Tranga/NotificationConnectors/NotificationConnector.cs index b75813d..76576ca 100644 --- a/Tranga/NotificationConnectors/NotificationConnector.cs +++ b/Tranga/NotificationConnectors/NotificationConnector.cs @@ -28,11 +28,11 @@ public abstract class NotificationConnector : GlobalBase if (_notificationRequested is not null && DateTime.Now.Subtract((DateTime)_notificationRequested) > TimeSpan.FromMinutes(NoChangeTimeout)) //If no updates have been requested for NoChangeTimeout minutes, update library { string[] uniqueTitles = _notifications.DistinctBy(n => n.Key).Select(n => n.Key).ToArray(); - Log($"Notification Buffer sending! {string.Join(", ", uniqueTitles)}"); + Log($"Notification Buffer sending! Notifications: {string.Join(", ", uniqueTitles)}"); foreach (string ut in uniqueTitles) { string[] texts = _notifications.Where(n => n.Key == ut).Select(n => n.Value).ToArray(); - SendNotificationInternal(ut, string.Join('\n', texts)); + SendNotificationInternal($"{ut} ({texts.Length})", string.Join('\n', texts)); } _notificationRequested = null; }