quick frontends (chat): send actual value instead of None on status and state updates

This commit is contained in:
Goffi 2017-01-09 23:10:16 +01:00
commit 42f5bb6192

View file

@ -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: