Mercurial > libervia-web
changeset 701:9aa2e251a993
browser side: when there is no avatar in cache in getAvatarURL, set its value to empty string to avoid requesting again
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 27 May 2015 19:11:25 +0200 |
parents | b81816f42c81 |
children | d94feb0d849e |
files | src/browser/libervia_main.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: