Commit 4c70ba44 authored by Dan Pascu's avatar Dan Pascu

Simplified bonjour contact removing iteration

parent 8fd67017
......@@ -838,9 +838,9 @@ class ContactModel(QAbstractListModel):
@ignore_contacts_db_updates
def _NH_BonjourAccountDidRemoveNeighbour(self, notification):
for contact in [c for c in self.items if type(c) is BonjourNeighbour]:
if contact.uri == unicode(notification.data.uri):
self.removeContact(contact)
uri = unicode(notification.data.uri)
for contact in [c for c in self.items if type(c) is BonjourNeighbour and c.uri == uri]:
self.removeContact(contact)
def _NH_SIPAccountDidActivate(self, notification):
account = notification.sender
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment