mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
settings selectable in tv mode
This commit is contained in:
parent
276cb78669
commit
57128dbc7d
1 changed files with 18 additions and 21 deletions
|
@ -94,28 +94,25 @@ class SettingsFragment : Fragment() {
|
|||
activity?.navigate(id, Bundle())
|
||||
}
|
||||
|
||||
settings_player?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_player)
|
||||
}
|
||||
val isTrueTv = context?.isTrueTvSettings() == true
|
||||
|
||||
settings_credits?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_account)
|
||||
listOf(
|
||||
Pair(settings_player, R.id.action_navigation_settings_to_navigation_settings_player),
|
||||
Pair(settings_credits, R.id.action_navigation_settings_to_navigation_settings_account),
|
||||
Pair(settings_ui, R.id.action_navigation_settings_to_navigation_settings_ui),
|
||||
Pair(settings_lang, R.id.action_navigation_settings_to_navigation_settings_lang),
|
||||
Pair(settings_nginx, R.id.action_navigation_settings_to_navigation_settings_nginx),
|
||||
Pair(settings_updates, R.id.action_navigation_settings_to_navigation_settings_updates),
|
||||
).forEach { (view, navigationId) ->
|
||||
view?.apply {
|
||||
setOnClickListener {
|
||||
navigate(navigationId)
|
||||
}
|
||||
|
||||
settings_ui?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_ui)
|
||||
if (isTrueTv) {
|
||||
isFocusable = true
|
||||
isFocusableInTouchMode = true
|
||||
}
|
||||
|
||||
settings_lang?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_lang)
|
||||
}
|
||||
|
||||
settings_nginx?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_nginx)
|
||||
}
|
||||
|
||||
settings_updates?.setOnClickListener {
|
||||
navigate(R.id.action_navigation_settings_to_navigation_settings_updates)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue