Update bluetooth label when a new device connects/disconnects (#708)

This commit is contained in:
davfsa
2025-01-11 09:07:03 +01:00
committed by GitHub
parent 1812193658
commit a9ad71ff42

View File

@@ -38,7 +38,13 @@ const Bluetooth = (): BarBoxChild => {
);
const componentBinding = Variable.derive(
[bind(options.bar.bluetooth.label), bind(bluetoothService, 'isPowered'), bind(bluetoothService, 'devices')],
[
bind(options.bar.bluetooth.label),
bind(bluetoothService, 'isPowered'),
bind(bluetoothService, 'devices'),
bind(bluetoothService, 'isConnected'),
],
(showLabel: boolean, isPowered: boolean, devices: AstalBluetooth.Device[]): JSX.Element => {
if (showLabel) {
return (