From 5977501b915a05c94fcf87479d42916f6049b358 Mon Sep 17 00:00:00 2001 From: mshafer1 <2565361+mshafer1@users.noreply.github.com> Date: Sat, 21 Dec 2024 08:28:46 -0600 Subject: [PATCH] remove _icon --- ntfysh_client/NotificationDialog.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ntfysh_client/NotificationDialog.cs b/ntfysh_client/NotificationDialog.cs index f917ab2..b9c0039 100644 --- a/ntfysh_client/NotificationDialog.cs +++ b/ntfysh_client/NotificationDialog.cs @@ -20,7 +20,6 @@ namespace ntfysh_client private System.Timers.Timer? _displayTimeoutTimer = null; private System.Windows.Forms.Timer? _updateTimer = null; private Stopwatch? _shownStopwatch = null; - private ToolTipIcon? _icon; public NotificationDialog() { @@ -39,13 +38,9 @@ namespace ntfysh_client HandleTimeout(null, null); } - // setup data - _icon = icon; - if (_icon != null) - { - iconBox.Image = ConvertToolTipIconToImage(_icon.Value); - } + // setup data + iconBox.Image = (icon is null) ? null : ConvertToolTipIconToImage(icon.Value); tbTitle.Text = title; tbMessage.Text = message;