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

@@ -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