From ad5797b5b3a64afcb783553111b1889a5a571d1b Mon Sep 17 00:00:00 2001 From: "dries.k" Date: Fri, 2 Jun 2023 21:17:41 +0200 Subject: [PATCH] do not set the tray icon color on low priority messages --- gotify_tray/gui/MainApplication.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gotify_tray/gui/MainApplication.py b/gotify_tray/gui/MainApplication.py index 1bf5308..0e7c1ce 100644 --- a/gotify_tray/gui/MainApplication.py +++ b/gotify_tray/gui/MainApplication.py @@ -232,13 +232,6 @@ class MainApplication(QtWidgets.QApplication): def new_message_callback(self, message: gotify.GotifyMessageModel, process: bool = True): self.add_message_to_model(message, process=process) - # Change the tray icon to show there are unread notifications - if ( - settings.value("tray/icon/unread", type=bool) - and not self.main_window.isActiveWindow() - ): - self.tray.set_icon_unread() - # Don't show a notification if it's low priority or the window is active if ( message.priority < settings.value("tray/notifications/priority", type=int) @@ -246,6 +239,13 @@ class MainApplication(QtWidgets.QApplication): ): return + # Change the tray icon to show there are unread notifications + if ( + settings.value("tray/icon/unread", type=bool) + and not self.main_window.isActiveWindow() + ): + self.tray.set_icon_unread() + # Get the application icon if ( settings.value("tray/notifications/icon/show", type=bool)