forked from recloudstream/cloudstream
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())
|
activity?.navigate(id, Bundle())
|
||||||
}
|
}
|
||||||
|
|
||||||
settings_player?.setOnClickListener {
|
val isTrueTv = context?.isTrueTvSettings() == true
|
||||||
navigate(R.id.action_navigation_settings_to_navigation_settings_player)
|
|
||||||
}
|
|
||||||
|
|
||||||
settings_credits?.setOnClickListener {
|
listOf(
|
||||||
navigate(R.id.action_navigation_settings_to_navigation_settings_account)
|
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)
|
||||||
}
|
}
|
||||||
|
if (isTrueTv) {
|
||||||
settings_ui?.setOnClickListener {
|
isFocusable = true
|
||||||
navigate(R.id.action_navigation_settings_to_navigation_settings_ui)
|
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