do not set the tray icon color on low priority messages
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user