Mercurial > libervia-web
changeset 753:76a9c074327b
browser_side (contact_panel): fixes contact box update
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 24 Nov 2015 11:00:26 +0100 |
parents | 9b57d117e8c5 |
children | d3fa1e8904cf |
files | src/browser/sat_browser/contact_panel.py |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_panel.py Mon Nov 23 23:30:34 2015 +0100 +++ b/src/browser/sat_browser/contact_panel.py Tue Nov 24 11:00:26 2015 +0100 @@ -97,18 +97,11 @@ return for contact_jid in set(current_jids).difference(jids): self.removeContactBox(contact_jid) - current_index = 0 - insert_count = 0 + count = 0 for contact_jid in jids: - try: - if current_jids[current_index] == contact_jid: - current_index += 1 - continue - except IndexError: - pass assert isinstance(contact_jid, jid.JID) - self.updateContactBox(contact_jid, current_index + insert_count) - insert_count += 1 + self.updateContactBox(contact_jid, count) + count += 1 def getContactBox(self, contact_jid): """Get the contact box for the given contact.