From 5414aa4996905ee3db1b2893c6a785e3c95659c6 Mon Sep 17 00:00:00 2001 From: mshafer1 <2565361+mshafer1@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:46:45 -0600 Subject: [PATCH] pass new options down to custom notifications form --- ntfysh_client/MainForm.cs | 9 ++++++++- ntfysh_client/NotificationDialog.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ntfysh_client/MainForm.cs b/ntfysh_client/MainForm.cs index 536ab8c..6684a05 100644 --- a/ntfysh_client/MainForm.cs +++ b/ntfysh_client/MainForm.cs @@ -79,7 +79,14 @@ namespace ntfysh_client } else { - this.notificationDialog.ShowNotification(finalTitle, e.Message, (int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, priorityIcon); + this.notificationDialog.ShowNotification( + title: finalTitle, + message: e.Message, + timeout_ms: (int)TimeSpan.FromSeconds((double)Program.Settings.Timeout).TotalMilliseconds, + icon: priorityIcon, + showTimeOutBar: Program.Settings.CustomTrayNotificationsShowTimeoutBar + showInDarkMode: Program.Settings.CustomTrayNotificationsShowInDarkMode + ); } } diff --git a/ntfysh_client/NotificationDialog.cs b/ntfysh_client/NotificationDialog.cs index 8729bba..a1cf101 100644 --- a/ntfysh_client/NotificationDialog.cs +++ b/ntfysh_client/NotificationDialog.cs @@ -47,7 +47,7 @@ namespace ntfysh_client InitializeWindowHidden(); } - public void ShowNotification(string title, string message, int timeout_ms = -1, ToolTipIcon? icon = null) + public void ShowNotification(string title, string message, int timeout_ms = -1, ToolTipIcon? icon = null, bool showTimeOutBar = true, bool showInDarkMode = true) { if (this.IsVisible) {