From 5bfb0449cfdbbaeba4446c790d0808272c56610f Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Fri, 21 Jun 2024 08:28:26 +0530 Subject: [PATCH] Fixed fragment title --- .../fragments/list/comments/CommentRepliesFragment.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentRepliesFragment.kt b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentRepliesFragment.kt index 555d1e58d..4a362b8f8 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentRepliesFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/comments/CommentRepliesFragment.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AppCompatActivity import androidx.compose.runtime.remember import androidx.compose.ui.platform.ComposeView import androidx.compose.ui.platform.ViewCompositionStrategy @@ -13,6 +14,7 @@ import androidx.paging.PagingConfig import org.schabi.newpipe.extractor.comments.CommentsInfoItem import org.schabi.newpipe.ktx.serializable import org.schabi.newpipe.ui.theme.AppTheme +import org.schabi.newpipe.util.Localization class CommentRepliesFragment : Fragment() { lateinit var comment: CommentsInfoItem @@ -23,6 +25,12 @@ class CommentRepliesFragment : Fragment() { savedInstanceState: Bundle? ): View { comment = requireArguments().serializable(COMMENT_KEY)!! + + val activity = requireActivity() as AppCompatActivity + val bar = activity.supportActionBar!! + bar.setDisplayShowTitleEnabled(true) + bar.title = Localization.replyCount(activity, comment.replyCount) + return ComposeView(requireContext()).apply { setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) setContent {