Tag channel list window when there is unread channels

This commit is contained in:
Fierelier 2020-11-26 15:25:31 +01:00
parent cd6ff6f164
commit ae535290f7
1 changed files with 9 additions and 0 deletions

View File

@ -135,9 +135,16 @@ class dbfApp:
index += 1
global oldUnreadChannels
unreadChannelsLength = len(unreadChannels)
if oldUnreadChannels != unreadChannels:
for gui in openGuis:
if gui.type == "channels":
if unreadChannelsLength > 0:
gui.title = "* Channels"
gui.window.setWindowTitle(getTitle(gui.title))
else:
gui.title = "Channels"
gui.window.setWindowTitle(getTitle(gui.title))
gui.repopulateChannels("conversations")
oldUnreadChannels = unreadChannels.copy()
fh = open(p(loginPath,"unreadChannels.json"),"w")
@ -412,6 +419,8 @@ class guiChannels:
self.closed = False
self.type = "channels"
self.title = "Channels"
global unreadChannels
if len(unreadChannels) > 0: self.title = "* " +self.title
self.width = 200
self.height = 350
self.window = dbfMainWindow(customEventFilter = (self,self.eventFilter))