summaryrefslogtreecommitdiff
path: root/modules/detachedcontent/bluetooth/DeviceList.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/detachedcontent/bluetooth/DeviceList.qml')
-rw-r--r--modules/detachedcontent/bluetooth/DeviceList.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/detachedcontent/bluetooth/DeviceList.qml b/modules/detachedcontent/bluetooth/DeviceList.qml
index bbacf30..8876be7 100644
--- a/modules/detachedcontent/bluetooth/DeviceList.qml
+++ b/modules/detachedcontent/bluetooth/DeviceList.qml
@@ -74,7 +74,11 @@ ColumnLayout {
accent: "Primary"
function onClicked(): void {
- root.session.bt.active = null;
+ if (root.session.bt.active)
+ root.session.bt.active = null;
+ else {
+ root.session.bt.active = deviceModel.values[0] ?? null;
+ }
}
}
}
@@ -137,6 +141,7 @@ ColumnLayout {
StyledListView {
model: ScriptModel {
+ id: deviceModel
values: [...Bluetooth.devices.values].sort((a, b) => (b.connected - a.connected) || (b.paired - a.paired))
}