diff --git a/app/src/main/java/com/github/libretube/ui/fragments/CommentsMainFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/CommentsMainFragment.kt index ed6c8d3fa1..caf154f6ac 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/CommentsMainFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/CommentsMainFragment.kt @@ -116,18 +116,16 @@ class CommentsMainFragment : Fragment() { commentPagingAdapter.submitData(it) } } + } + } - launch { - viewModel.commentCountLiveData.observe(viewLifecycleOwner) { commentCount -> - if (commentCount == null) return@observe + viewModel.commentCountLiveData.observe(viewLifecycleOwner) { commentCount -> + if (commentCount == null) return@observe - commentsSheet?.updateFragmentInfo( - false, - getString(R.string.comments_count, commentCount.formatShort()) - ) - } - } - } + commentsSheet?.updateFragmentInfo( + false, + getString(R.string.comments_count, commentCount.formatShort()) + ) } }