add channel

This commit is contained in:
Li ZongYing
2024-01-26 18:30:31 +08:00
parent cda19995b2
commit 4bdc625718
10 changed files with 80 additions and 40 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
}