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.
pull/15/head
Peter Hutterer 2018-01-23 14:56:00 +10:00
parent 7aa4314c3d
commit 5e32dc4872
1 changed files with 2 additions and 0 deletions

View File

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