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,8 +678,11 @@ class ResultFragmentTv : Fragment() {
) )
return@setOnLongClickListener true return@setOnLongClickListener true
} }
if (!hasLoadedEpisodesOnce) {
hasLoadedEpisodesOnce = true
focusPlayButton() focusPlayButton()
} }
}
/* /*
* Okay so what is this fuckery? * Okay so what is this fuckery?