toast notifications(+) #17

Merged
mshafer1 merged 41 commits from dev/toast_notifications_plus into master 2025-02-11 04:53:56 -05:00
7 changed files with 717 additions and 15 deletions
Showing only changes of commit 42421d9820 - Show all commits

View File

@@ -72,8 +72,15 @@ 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)