mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix: observe comment count outside of lifecycle aware block (#6961)
This commit is contained in:
parent
844b7d11ba
commit
31ec3bb3c4
@ -116,8 +116,9 @@ class CommentsMainFragment : Fragment() {
|
|||||||
commentPagingAdapter.submitData(it)
|
commentPagingAdapter.submitData(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
launch {
|
|
||||||
viewModel.commentCountLiveData.observe(viewLifecycleOwner) { commentCount ->
|
viewModel.commentCountLiveData.observe(viewLifecycleOwner) { commentCount ->
|
||||||
if (commentCount == null) return@observe
|
if (commentCount == null) return@observe
|
||||||
|
|
||||||
@ -127,9 +128,6 @@ class CommentsMainFragment : Fragment() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user