This commit is contained in:
sankalp committed 2025-02-17 21:27:34 +05:45
1 parent c1f98a7fe3
commit 4d5ddf7ecb
6 files changed
+160 -741

No files matched your search

+2 -3
View File
@@ -79,7 +79,8 @@ class BluetoothConnections(Box):
child=self.toggle_icon,
on_clicked=lambda *_: self.client.toggle_power(),
)
self.client.notify("scanning")
self.client.notify("enabled")
self.client.connect(
"notify::enabled",
lambda *_: self.toggle_icon.set_label(
@@ -119,8 +120,6 @@ class BluetoothConnections(Box):
# to run notify closures thus display the status
# without having to wait until an actual change
self.client.notify("scanning")
self.client.notify("enabled")
def on_device_added(self, client: BluetoothClient, address: str):
if not (device := client.get_device(address)):