mirror of
https://github.com/Michatec/Radio.git
synced 2026-03-31 23:46:28 +02:00
feat(ui): add keyboard shortcut for favouriting stations
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user