feat(ui): add keyboard shortcut for favouriting stations

This commit is contained in:
2026-03-28 21:03:54 +01:00
parent f66b5af810
commit f038e01981
2 changed files with 7 additions and 2 deletions

View File

@@ -77,10 +77,11 @@ You can help out the radio-browser.info community by [adding the missing station
When **Edit Stations** is enabled: When **Edit Stations** is enabled:
- Press **← (Left)** on the remote to open the detailed station editing area - Press **← (Left)** on the remote to open the detailed station editing area
- Press **1** or **Back** to close the editing area - Press **2** or **Back** to close the editing area
**General TV** Controls: **General TV** Controls:
- Press **0** or **DEL** to remove the selected radio station - Press **0** or **DEL** to remove the selected radio station
- Press **1** or **SPACE** to make the selected radio station favourite
</details> </details>

View File

@@ -419,7 +419,7 @@ class CollectionAdapter(
return@setOnKeyListener true return@setOnKeyListener true
} }
} }
KeyEvent.KEYCODE_NUMPAD_1, KeyEvent.KEYCODE_1, KeyEvent.KEYCODE_BACK -> { KeyEvent.KEYCODE_NUMPAD_2, KeyEvent.KEYCODE_2, KeyEvent.KEYCODE_BACK -> {
if (expandedStationPosition == stationViewHolder.bindingAdapterPosition) { if (expandedStationPosition == stationViewHolder.bindingAdapterPosition) {
val position: Int = stationViewHolder.bindingAdapterPosition val position: Int = stationViewHolder.bindingAdapterPosition
toggleEditViews(position, station.uuid) toggleEditViews(position, station.uuid)
@@ -430,6 +430,10 @@ class CollectionAdapter(
removeStation(context, stationViewHolder.bindingAdapterPosition) removeStation(context, stationViewHolder.bindingAdapterPosition)
return@setOnKeyListener true return@setOnKeyListener true
} }
KeyEvent.KEYCODE_NUMPAD_1, KeyEvent.KEYCODE_1, KeyEvent.KEYCODE_SPACE -> {
toggleStarredStation(context, stationViewHolder.bindingAdapterPosition)
return@setOnKeyListener true
}
} }
} }
false false