diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 14:52:05 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-04 14:52:05 +1000 |
| commit | c1b844b8571b6a5f9bde2490f841e76a0c8efaac (patch) | |
| tree | eceaf08da3d6bc550181b4e42c4a5df9275e0eba /modules/detachedcontent/bluetooth/DeviceList.qml | |
| parent | dcontent: add audio placeholder (diff) | |
| download | caelestia-shell-c1b844b8571b6a5f9bde2490f841e76a0c8efaac.tar.gz caelestia-shell-c1b844b8571b6a5f9bde2490f841e76a0c8efaac.tar.bz2 caelestia-shell-c1b844b8571b6a5f9bde2490f841e76a0c8efaac.zip | |
dcontent/bt: settings toggle between
Make settings button go to first device if already on settings
Diffstat (limited to 'modules/detachedcontent/bluetooth/DeviceList.qml')
| -rw-r--r-- | modules/detachedcontent/bluetooth/DeviceList.qml | 7 |
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)) } |