dbus: don't update self.paired unless it changes
TuhDevice.paired is set on every device update (RSSI changes!) and that sends a GObject.notify() for the property. Filter those, otherwise we're just spamming dbus with PropertiesChanged notify events even though nothing has actually changed.
This commit is contained in:
parent
7aa4314c3d
commit
5e32dc4872
|
@ -206,6 +206,8 @@ class TuhiDBusDevice(GObject.Object):
|
|||
self.emit('pair-requested')
|
||||
|
||||
def _on_device_paired(self, device, pspec):
|
||||
if self.paired == device.paired:
|
||||
return
|
||||
self.paired = device.paired
|
||||
|
||||
def _start_listening(self, connection, sender):
|
||||
|
|
Loading…
Reference in New Issue