add channel

This commit is contained in:
Li ZongYing
2024-01-27 19:52:36 +08:00
parent f7eebb3f7a
commit bcf9bab25f
11 changed files with 86 additions and 42 deletions
@@ -30,7 +30,7 @@ class ChannelFragment : Fragment() {
fun show(tvViewModel: TVViewModel) {
handler.removeCallbacks(hideRunnable)
handler.removeCallbacks(playRunnable)
binding.channelContent.text = tvViewModel.id.value.toString()
binding.channelContent.text = (tvViewModel.id.value?.plus(1)).toString()
view?.visibility = View.VISIBLE
handler.postDelayed(hideRunnable, delay)
}
@@ -60,7 +60,7 @@ class ChannelFragment : Fragment() {
}
private val playRunnable = Runnable {
(activity as MainActivity).play(channel)
(activity as MainActivity).play(channel - 1)
binding.channelContent.text = ""
view?.visibility = View.GONE
}