1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

bluez: fix disappearing popouts with modal maanger

This commit is contained in:
bbedward
2025-11-18 14:36:10 -05:00
parent 10639a5ead
commit 4e6f0d5e87
9 changed files with 106 additions and 50 deletions

View File

@@ -49,20 +49,20 @@ Singleton {
return devices.sort((a, b) => {
const aName = a.name || a.deviceName || ""
const bName = b.name || b.deviceName || ""
const aAddr = a.address || ""
const bAddr = b.address || ""
const aHasRealName = aName.includes(" ") && aName.length > 3
const bHasRealName = bName.includes(" ") && bName.length > 3
if (aHasRealName && !bHasRealName) {
return -1
}
if (!aHasRealName && bHasRealName) {
return 1
if (aHasRealName && !bHasRealName) return -1
if (!aHasRealName && bHasRealName) return 1
if (aHasRealName && bHasRealName) {
return aName.localeCompare(bName)
}
const aSignal = (a.signalStrength !== undefined && a.signalStrength > 0) ? a.signalStrength : 0
const bSignal = (b.signalStrength !== undefined && b.signalStrength > 0) ? b.signalStrength : 0
return bSignal - aSignal
return aAddr.localeCompare(bAddr)
})
}

View File

@@ -23,6 +23,7 @@ Singleton {
property var colorPickerModal: null
property var notificationModal: null
property var wifiPasswordModal: null
property var bluetoothPairingModal: null
property var networkInfoModal: null
property var notepadSlideouts: []