summaryrefslogtreecommitdiff
path: root/modules/bar.tsx
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-15 22:06:01 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-15 22:06:01 +1100
commitf24d36129a13fb7fd9b08f932a9cfa9957acf90c (patch)
tree6e23b14018495699b8199572805d0ea8b0c33c36 /modules/bar.tsx
parentbar: fix bluetooth tooltip (diff)
downloadcaelestia-shell-f24d36129a13fb7fd9b08f932a9cfa9957acf90c.tar.gz
caelestia-shell-f24d36129a13fb7fd9b08f932a9cfa9957acf90c.tar.bz2
caelestia-shell-f24d36129a13fb7fd9b08f932a9cfa9957acf90c.zip
bar: bluetooth hook on alias
Just in case alias changes
Diffstat (limited to 'modules/bar.tsx')
-rw-r--r--modules/bar.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/bar.tsx b/modules/bar.tsx
index 9374b51..3e75deb 100644
--- a/modules/bar.tsx
+++ b/modules/bar.tsx
@@ -319,9 +319,13 @@ const Bluetooth = () => (
: "No connected devices"
);
};
- bluetooth.get_devices().forEach(d => self.hook(d, "notify::connected", update));
- self.hook(bluetooth, "device-added", (_, device) => {
+ const hookDevice = (device: AstalBluetooth.Device) => {
self.hook(device, "notify::connected", update);
+ self.hook(device, "notify::alias", update);
+ };
+ bluetooth.get_devices().forEach(hookDevice);
+ self.hook(bluetooth, "device-added", (_, device) => {
+ hookDevice(device);
update();
});
update();