indicate hilights in statusbar immediately

This commit is contained in:
ed 2022-09-01 23:25:37 +02:00
parent 93a1f563a2
commit eebd68b23a
2 changed files with 12 additions and 3 deletions

View File

@ -850,7 +850,7 @@ class VT100_Client(object):
# print('ping in {0} while in {1}'.format(uchan.nchan.get_name(), self.user.active_chan.nchan.get_name()))
if self.bell and len(uchan.nchan.uchans) > 1:
self.say(u"\x07".encode("utf-8"))
self.say(b"\x07")
if self.show_hilight_tutorial:
self.show_hilight_tutorial = False

View File

@ -96,8 +96,14 @@ class World(object):
last_msg = nchan.msgs[-1].sno if nchan.msgs else 0
upd_users = set() # users with clients to repaint
for uchan in nchan.uchans:
uchan.update_activity_flags(False, last_msg)
if uchan.update_activity_flags(False, last_msg):
# update status bar immediately
if uchan.user.active_chan != uchan:
upd_users.add(uchan.user)
if uchan.user.active_chan == uchan:
if (
not uchan.user.client.handshake_sz
@ -106,7 +112,10 @@ class World(object):
continue
# print('refreshing {0} for {1}'.format(nchan.get_name(), uchan.user.nick))
uchan.user.client.refresh(False)
upd_users.add(uchan.user)
for user in upd_users:
user.client.refresh(False)
def send_chan_msg(self, from_nick, nchan, text, ping_self=True):
max_hist_mem = self.ar.hist_mem