# HG changeset patch # User Goffi # Date 1432746496 -7200 # Node ID ba09cd8793432cd70d629f4a6c4ad9ef10fb2b61 # Parent 798e5e38516b302c8142c684c57a5a3ea511a696 quick frontends (contact list): cache is not cleared anymore on QuickContactList.fill, avoiding the accidental removal of cached values like avatars diff -r 798e5e38516b -r ba09cd879343 frontends/src/quick_frontend/quick_contact_list.py --- a/frontends/src/quick_frontend/quick_contact_list.py Fri May 22 22:31:37 2015 +0200 +++ b/frontends/src/quick_frontend/quick_contact_list.py Wed May 27 19:08:16 2015 +0200 @@ -139,7 +139,7 @@ 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 @@ 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()