diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index 0b402f53..1f0f64d7 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -139,7 +139,7 @@ class QuickContactList(QuickWidget): Contacts will be cleared before refilling them """ - self.clearContacts() + self.clearContacts(keep_cache=True) def gotContacts(contacts): for contact in contacts: self.host.newContactHandler(*contact, profile=self.profile) @@ -259,10 +259,14 @@ class QuickContactList(QuickWidget): return self._special_extras return set([extra for extra in self._special_extras if extra.bare in self.getSpecials(special_type)]) - def clearContacts(self): - """Clear all the contact list""" + def clearContacts(self, keep_cache=False): + """Clear all the contact list + + @param keep_cache: if True, don't reset the cache + """ self.unselectAll() - self._cache.clear() + if not keep_cache: + self._cache.clear() self._groups.clear() self._specials.clear() self._special_extras.clear()