quick frontend (chat): update use a dict
This commit is contained in:
parent
bb9e22c020
commit
320139c34e
1 changed files with 4 additions and 4 deletions
|
|
@ -142,7 +142,7 @@ class Message(object):
|
|||
def status(self, status):
|
||||
self._status = status
|
||||
for w in self.widgets:
|
||||
w.update(["status"])
|
||||
w.update({"status": None})
|
||||
|
||||
def handleMe(self):
|
||||
"""Check if messages starts with "/me " and change them if it is the case
|
||||
|
|
@ -212,7 +212,7 @@ class Occupant(object):
|
|||
def state(self, new_state):
|
||||
self._state = new_state
|
||||
for w in self.widgets:
|
||||
w.update(["state"])
|
||||
w.update({"state":None})
|
||||
|
||||
def update(self, update_dict=None):
|
||||
for w in self.widgets:
|
||||
|
|
@ -573,11 +573,11 @@ class QuickChat(quick_widgets.QuickWidget):
|
|||
def onAvatar(self, entity, filename, profile):
|
||||
if self.type == C.CHAT_GROUP:
|
||||
if entity.bare == self.target and entity.resource in self.occupants:
|
||||
self.occupants[entity.resource].update(['avatar'])
|
||||
self.occupants[entity.resource].update({'avatar': filename})
|
||||
for m in self.messages.values():
|
||||
if m.nick == entity.resource:
|
||||
for w in m.widgets:
|
||||
w.update('avatar', filename)
|
||||
w.update({'avatar': filename})
|
||||
else:
|
||||
if entity.bare == self.target.bare:
|
||||
log.info("entity avatar updated")
|
||||
|
|
|
|||
Loading…
Reference in a new issue