bar: bluetooth hook on alias
Just in case alias changes
This commit is contained in:
parent
434efd3270
commit
f24d36129a
1 changed files with 6 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue