mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Syntax fix **better upower bridge
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user