mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 22:15:38 -05:00
feat: Only colour Bluetooth icon in DankBar if a device is connected (#497)
This commit is contained in:
@@ -15,6 +15,15 @@ Singleton {
|
||||
readonly property bool enabled: (adapter && adapter.enabled) ?? false
|
||||
readonly property bool discovering: (adapter && adapter.discovering) ?? false
|
||||
readonly property var devices: adapter ? adapter.devices : null
|
||||
readonly property bool connected: {
|
||||
if (!adapter || !adapter.devices) {
|
||||
return false
|
||||
}
|
||||
|
||||
let isConnected = false
|
||||
adapter.devices.values.forEach(dev => { if (dev.connected) isConnected = true })
|
||||
return isConnected
|
||||
}
|
||||
readonly property var pairedDevices: {
|
||||
if (!adapter || !adapter.devices) {
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user