Mercurial > libervia-web
diff src/browser/libervia_main.py @ 624:9092e624bb27 frontends_multi_profiles
browser_side: fixes various issues
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 22 Feb 2015 21:51:20 +0100 |
parents | 4f7550a083b4 |
children | 66a547539185 |
line wrap: on
line diff
--- a/src/browser/libervia_main.py Sun Feb 22 21:42:14 2015 +0100 +++ b/src/browser/libervia_main.py Sun Feb 22 21:51:20 2015 +0100 @@ -60,7 +60,9 @@ except ImportError: pass -unicode = lambda s: str(s) + +unicode = str # FIXME: pyjamas workaround + MAX_MBLOG_CACHE = 500 # Max microblog entries kept in memories @@ -207,7 +209,8 @@ @return: the URL to the avatar (str) """ assert isinstance(jid_, jid.JID) - avatar_hash = self.contact_lists[C.PROF_KEY_NONE].getCache(jid_, 'avatar') + 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 have no value for avatar_hash, so we request the vcard self.bridge.getCard(unicode(jid_), profile=C.PROF_KEY_NONE) @@ -351,7 +354,6 @@ def addContactList(self, dummy): contact_list = ContactList(self) - self.contact_lists[C.PROF_KEY_NONE] = contact_list self.panel.addContactList(contact_list) return contact_list