quick frontends (chat): send actual value instead of None on status and state updates
This commit is contained in:
parent
1e09016747
commit
42f5bb6192
1 changed files with 8 additions and 6 deletions
|
|
@ -149,9 +149,10 @@ class Message(object):
|
|||
|
||||
@status.setter
|
||||
def status(self, status):
|
||||
self._status = status
|
||||
for w in self.widgets:
|
||||
w.update({"status": None})
|
||||
if status != self._status:
|
||||
self._status = status
|
||||
for w in self.widgets:
|
||||
w.update({"status": status})
|
||||
|
||||
def handleMe(self):
|
||||
"""Check if messages starts with "/me " and change them if it is the case
|
||||
|
|
@ -219,9 +220,10 @@ class Occupant(object):
|
|||
|
||||
@state.setter
|
||||
def state(self, new_state):
|
||||
self._state = new_state
|
||||
for w in self.widgets:
|
||||
w.update({"state":None})
|
||||
if new_state != self._state:
|
||||
self._state = new_state
|
||||
for w in self.widgets:
|
||||
w.update({"state": new_state})
|
||||
|
||||
def update(self, update_dict=None):
|
||||
for w in self.widgets:
|
||||
|
|
|
|||
Loading…
Reference in a new issue