Syntax fix **better upower bridge

This commit is contained in:
Turann_
2026-02-11 13:46:16 +03:00
parent cb6766e198
commit 1bde070442
+6 -1
View File
@@ -165,7 +165,12 @@ Singleton {
}
function isBluetoothDevice(device) {
return device && device.batteryAvailable !== undefined;
if (!device) {return false;}
// Check for Quickshell Bluetooth device property
if (device.batteryAvailable !== undefined) {return true;}
// Check for UPower device path indicating it's a Bluetooth device
if (device.nativePath && (device.nativePath.includes("bluez") || device.nativePath.includes("bluetooth"))) {return true;}
return false;
}
function getDeviceName(device) {