comparison frontends/src/quick_frontend/quick_app.py @ 2061:748e539c5feb

quick frontend (contat list/cache): workaround for avatar issue in MUC. Need to be reworked properly in the future (TODO)
author Goffi <goffi@goffi.org>
date Fri, 09 Sep 2016 23:54:33 +0200
parents 9dd76a5b63ba
children 09c18fcd8225
comparison
equal deleted inserted replaced
2060:d44360763262 2061:748e539c5feb
762 if key == "nick": # this is the roster nick, not the MUC nick 762 if key == "nick": # this is the roster nick, not the MUC nick
763 if entity in self.contact_lists[profile]: 763 if entity in self.contact_lists[profile]:
764 self.contact_lists[profile].setCache(entity, 'nick', value) 764 self.contact_lists[profile].setCache(entity, 'nick', value)
765 self.callListeners('nick', entity, value, profile=profile) 765 self.callListeners('nick', entity, value, profile=profile)
766 elif key == "avatar": 766 elif key == "avatar":
767 if value and entity in self.contact_lists[profile]: 767 if value: # and entity in self.contact_lists[profile]:
768 # FIXME: contact_list check is removed to work around 'avatar' issues
769 # (avatar can't be requested if we don't save them here)
770 # avatar need to be refactored properly in backend and here
768 def gotFilename(filename): 771 def gotFilename(filename):
769 self.contact_lists[profile].setCache(entity, 'avatar', filename) 772 self.contact_lists[profile].setCache(entity, 'avatar', filename)
770 self.callListeners('avatar', entity, filename, profile=profile) 773 self.callListeners('avatar', entity, filename, profile=profile)
771 self.bridge.getAvatarFile(value, callback=gotFilename) 774 self.bridge.getAvatarFile(value, callback=gotFilename)
772 775