primitivus: fixes contact group update

This commit is contained in:
souliane 2014-04-27 18:22:12 +02:00
commit f3a0686176

View file

@ -76,6 +76,14 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
self.replace(jid)
def replace(self, contact, groups=None, attributes=None):
"""Add a contact to the list if doesn't exist, else update it.
@param jid (JID)
@param groups (list): list of groups or None to ignore the groups membership.
@param attributes (dict)
XXX: None value for 'groups' has a different meaning than [None] which is for the default group.
"""
debug(_("update %s") % contact)
if not self.__find_idx(contact):
self.add(contact, groups)