From 413a80634ae56d1a05a8421db929c7e809f638ba Mon Sep 17 00:00:00 2001 From: nnym Date: Sat, 4 Nov 2023 16:42:45 +0000 Subject: [PATCH] FreeDesktop: fix duration and body height. (#25) --- .../FreeDesktopNotificationManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DesktopNotifications.FreeDesktop/FreeDesktopNotificationManager.cs b/DesktopNotifications.FreeDesktop/FreeDesktopNotificationManager.cs index b921dec..d956897 100644 --- a/DesktopNotifications.FreeDesktop/FreeDesktopNotificationManager.cs +++ b/DesktopNotifications.FreeDesktop/FreeDesktopNotificationManager.cs @@ -105,7 +105,7 @@ public async Task ShowNotification(Notification notification, DateTimeOffset? ex GenerateNotificationBody(notification), actions.ToArray(), new Dictionary { { "urgency", 1 } }, - duration?.Milliseconds ?? 0 + (int?) duration?.TotalMilliseconds ?? 0 ).ConfigureAwait(false); _activeNotifications[id] = notification; @@ -149,12 +149,12 @@ private string GenerateNotificationBody(Notification notification) var sb = new StringBuilder(); - sb.AppendLine(notification.Body); + sb.Append(notification.Body); if (Capabilities.HasFlag(NotificationManagerCapabilities.BodyImages) && notification.BodyImagePath is { } img) { - sb.AppendLine($@""); + sb.Append($@"\n"); } return sb.ToString();