comparison src/browser/libervia_main.py @ 480:50b286866739

browser side: display avatars in the contact panel
author souliane <souliane@mailoo.org>
date Sat, 14 Jun 2014 19:20:27 +0200
parents c21ea1fe3593
children 437eefa53a01
comparison
equal deleted inserted replaced
479:c21ea1fe3593 480:50b286866739
807 def _entityDataUpdatedCb(self, entity_jid_s, key, value): 807 def _entityDataUpdatedCb(self, entity_jid_s, key, value):
808 if key == "avatar": 808 if key == "avatar":
809 avatar = '/avatars/%s' % value 809 avatar = '/avatars/%s' % value
810 810
811 self.avatars_cache[entity_jid_s] = avatar 811 self.avatars_cache[entity_jid_s] = avatar
812 self.contact_panel.updateAvatar(entity_jid_s, avatar)
812 813
813 for lib_wid in self.libervia_widgets: 814 for lib_wid in self.libervia_widgets:
814 if isinstance(lib_wid, panels.MicroblogPanel): 815 if isinstance(lib_wid, panels.MicroblogPanel):
815 if lib_wid.isJidAccepted(entity_jid_s) or (self.whoami and entity_jid_s == self.whoami.bare): 816 if lib_wid.isJidAccepted(entity_jid_s) or (self.whoami and entity_jid_s == self.whoami.bare):
816 lib_wid.updateValue('avatar', entity_jid_s, avatar) 817 lib_wid.updateValue('avatar', entity_jid_s, avatar)