mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
fix(bluetooth): sync toggle state with device connection (#1252)
This commit is contained in:
@@ -56,9 +56,13 @@ const BluetoothDevice = (device) => {
|
||||
onChange: (self, newValue) => {
|
||||
device.setConnection(newValue);
|
||||
},
|
||||
extraSetup: (self) => self.hook(device, (self) => {
|
||||
Utils.timeout(200, () => self.enabled.value = device.connected);
|
||||
}),
|
||||
extraSetup: (self) => {
|
||||
self.hook(device, () => {
|
||||
const enabledState = self.attribute.enabled;
|
||||
if (enabledState.value !== device.connected)
|
||||
enabledState.value = device.connected;
|
||||
});
|
||||
},
|
||||
})
|
||||
const deviceRemoveButton = Button({
|
||||
vpack: 'center',
|
||||
|
||||
Reference in New Issue
Block a user