fixed property updates from events
This commit is contained in:
parent
f25d2ba183
commit
41db725e15
|
|
@ -189,10 +189,12 @@ class DeviceInfo(_api.PairedDevice):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if type(status) == tuple:
|
if type(status) == tuple:
|
||||||
ui_flags = status[1].pop(PROPS.UI_FLAGS, 0)
|
new_status, new_props = status
|
||||||
self.props.update(status[1])
|
ui_flags = new_props.pop(PROPS.UI_FLAGS, 0)
|
||||||
self.status = status[0]
|
old_props = dict(self.props)
|
||||||
if ui_flags:
|
self.props.update(new_props)
|
||||||
|
self.status = new_status
|
||||||
|
if ui_flags or old_props != self.props:
|
||||||
self.status_changed_callback(self, ui_flags)
|
self.status_changed_callback(self, ui_flags)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue