summaryrefslogtreecommitdiff
path: root/poezio/tabs/muctab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-07-12 21:05:46 +0200
committermathieui <mathieui@mathieui.net>2016-07-12 21:05:46 +0200
commita548e2ff6df2abec1791464055deeb9976ca73f8 (patch)
tree07ca709d8e2dae1b453327b66b38ffa4d98dc913 /poezio/tabs/muctab.py
parentd19f53c3e9c5c02773b9fb3cdfe68a3cb245c833 (diff)
downloadpoezio-a548e2ff6df2abec1791464055deeb9976ca73f8.tar.gz
poezio-a548e2ff6df2abec1791464055deeb9976ca73f8.tar.bz2
poezio-a548e2ff6df2abec1791464055deeb9976ca73f8.tar.xz
poezio-a548e2ff6df2abec1791464055deeb9976ca73f8.zip
Improve refresh performance in big rooms
going through a list with more than 1000 elements, one at a time, can be a bit tedious. Especially if you go through it every time you receive one of those elements.
Diffstat (limited to 'poezio/tabs/muctab.py')
-rw-r--r--poezio/tabs/muctab.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index b6f55f7c..7ec7935c 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -59,6 +59,7 @@ class MucTab(ChatTab):
if self.joined == False:
self._state = 'disconnected'
self.own_nick = nick
+ self.own_user = None
self.name = jid
self.password = password
self.users = []
@@ -958,7 +959,7 @@ class MucTab(ChatTab):
if display_user_list:
self.v_separator.refresh()
self.user_win.refresh(self.users)
- self.info_header.refresh(self, self.text_win)
+ self.info_header.refresh(self, self.text_win, user=self.own_user)
self.refresh_tab_win()
if display_info_win:
self.info_win.refresh()
@@ -1096,6 +1097,7 @@ class MucTab(ChatTab):
# ejabberd or every gateway in the world that just do
# not send a 110 status code with the presence
self.own_nick = from_nick
+ self.own_user = new_user
self.joined = True
if self.name in self.core.initial_joins:
self.core.initial_joins.remove(self.name)
@@ -1201,7 +1203,7 @@ class MucTab(ChatTab):
if self.core.current_tab() is self:
self.text_win.refresh()
self.user_win.refresh_if_changed(self.users)
- self.info_header.refresh(self, self.text_win)
+ self.info_header.refresh(self, self.text_win, user=self.own_user)
self.input.refresh()
self.core.doupdate()