# HG changeset patch # User Goffi # Date 1432746685 -7200 # Node ID 9aa2e251a993e5d22d201d02f2eeb53463016e72 # Parent b81816f42c81d6d0e304fcf2f13af49fbd64e3ec browser side: when there is no avatar in cache in getAvatarURL, set its value to empty string to avoid requesting again diff -r b81816f42c81 -r 9aa2e251a993 src/browser/libervia_main.py --- a/src/browser/libervia_main.py Wed May 27 19:10:16 2015 +0200 +++ b/src/browser/libervia_main.py Wed May 27 19:11:25 2015 +0200 @@ -231,6 +231,8 @@ contact_list = self.contact_list # pyjamas issue: need a temporary variable to call a property's method avatar_hash = contact_list.getCache(jid_, 'avatar') if avatar_hash is None: + # we set to empty string to avoid requesting vcard several times + contact_list.setCache(jid_, 'avatar', '') # we have no value for avatar_hash, so we request the vcard self.bridge.getCard(unicode(jid_), profile=C.PROF_KEY_NONE) if not avatar_hash: