small fix

This commit is contained in:
LagradOst 2023-09-21 22:46:23 +02:00
parent 15333123cd
commit 527a6388a9

View file

@ -648,6 +648,9 @@ class ResultFragmentTv : Fragment() {
.show() .show()
} }
} }
// Used to request focus the first time the episodes are loaded.
var hasLoadedEpisodesOnce = false
observeNullable(viewModel.episodes) { episodes -> observeNullable(viewModel.episodes) { episodes ->
binding?.apply { binding?.apply {
resultEpisodes.isVisible = episodes is Resource.Success resultEpisodes.isVisible = episodes is Resource.Success
@ -675,7 +678,10 @@ class ResultFragmentTv : Fragment() {
) )
return@setOnLongClickListener true return@setOnLongClickListener true
} }
focusPlayButton() if (!hasLoadedEpisodesOnce) {
hasLoadedEpisodesOnce = true
focusPlayButton()
}
} }
/* /*