Skip to content

Commit

Permalink
FreeDesktop: fix duration and body height. (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnym authored Nov 4, 2023
1 parent d7a2981 commit 413a806
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public async Task ShowNotification(Notification notification, DateTimeOffset? ex
GenerateNotificationBody(notification),
actions.ToArray(),
new Dictionary<string, object> { { "urgency", 1 } },
duration?.Milliseconds ?? 0
(int?) duration?.TotalMilliseconds ?? 0
).ConfigureAwait(false);

_activeNotifications[id] = notification;
Expand Down Expand Up @@ -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($@"<img src=""{img}"" alt=""{notification.BodyImageAltText}""/>");
sb.Append($@"\n<img src=""{img}"" alt=""{notification.BodyImageAltText}""/>");
}

return sb.ToString();
Expand Down

0 comments on commit 413a806

Please sign in to comment.