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:
@@ -419,7 +419,7 @@ class CollectionAdapter(
|
||||
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) {
|
||||
val position: Int = stationViewHolder.bindingAdapterPosition
|
||||
toggleEditViews(position, station.uuid)
|
||||
@@ -430,6 +430,10 @@ class CollectionAdapter(
|
||||
removeStation(context, stationViewHolder.bindingAdapterPosition)
|
||||
return@setOnKeyListener true
|
||||
}
|
||||
KeyEvent.KEYCODE_NUMPAD_1, KeyEvent.KEYCODE_1, KeyEvent.KEYCODE_SPACE -> {
|
||||
toggleStarredStation(context, stationViewHolder.bindingAdapterPosition)
|
||||
return@setOnKeyListener true
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user