Philipp Hörist pushed to branch mainwindow at gajim / gajim


Commits:
bc3e394a by lovetox at 2021-03-17T22:16:24+01:00
Simplify code

- - - - -


1 changed file:

- gajim/gtk/groupchat_invite.py


Changes:

=====================================
gajim/gtk/groupchat_invite.py
=====================================
@@ -80,17 +80,16 @@ def _add_contacts(self):
         for account, _label in self._accounts:
             self.new_contact_rows[account] = None
             client = app.get_client(account)
-            for jid, _data in client.get_module('Roster').iter():
-                contact = client.get_module('Contacts').get_contact(jid)
+            for contact in client.get_module('Roster').iter_contacts():
 
                 # Exclude group chats
                 if contact.is_groupchat:
                     continue
                 # Exclude our own jids
-                if jid in our_jids:
+                if contact.jid in our_jids:
                     continue
 
-                row = ContactRow(account, contact, jid,
+                row = ContactRow(account, contact, contact.jid,
                                  contact.name, show_account)
                 self._ui.contacts_listbox.add(row)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/bc3e394a0921ab05faf7f909724945f1d7252b69

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/bc3e394a0921ab05faf7f909724945f1d7252b69
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to