if settings says to use the native notifications, use them

This commit is contained in:
mshafer1
2024-12-20 21:34:18 -06:00
parent 93ac99dd7c
commit 42421d9820

View File

@@ -73,7 +73,14 @@ namespace ntfysh_client
string finalTitle = string.IsNullOrWhiteSpace(e.Title) ? $"{e.Sender.TopicId}@{e.Sender.ServerUrl}" : e.Title;
this.notificationDialog.ShowNotification(finalTitle, e.Message, (int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, priorityIcon);
if (Program.Settings.UseNativeWindowsNotifications)
{
notifyIcon.ShowBalloonTip((int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, finalTitle, e.Message, priorityIcon);
}
else
{
this.notificationDialog.ShowNotification(finalTitle, e.Message, (int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, priorityIcon);
}
}
private void OnConnectionMultiAttemptFailure(NotificationListener sender, SubscribedTopic topic)