Bluetooth WIP but way more reliable than before

This commit is contained in:
quadbyte 2025-08-17 10:43:17 -04:00
parent a390af2aae
commit d2acdd1c19
3 changed files with 371 additions and 593 deletions

View file

@ -15,18 +15,11 @@ NIconButton {
showBorder: false
visible: bluetoothEnabled
Component.onCompleted: {
Logger.log("Bluetooth", "Component loaded, bluetoothEnabled:", bluetoothEnabled)
Logger.log("Bluetooth", "BluetoothService available:", typeof BluetoothService !== 'undefined')
if (typeof BluetoothService !== 'undefined') {
Logger.log("Bluetooth", "Connected devices:", BluetoothService.connectedDevices.length)
}
}
icon: {
// Show different icons based on connection status
if (BluetoothService.connectedDevices.length > 0) {
if (BluetoothService.pairedDevices.length > 0) {
return "bluetooth_connected"
} else if (BluetoothService.isDiscovering) {
} else if (BluetoothService.discovering) {
return "bluetooth_searching"
} else {
return "bluetooth"