mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 00:50:32 +00:00
Fixed fragment title
This commit is contained in:
parent
0ec81c9e52
commit
5bfb0449cf
@ -4,6 +4,7 @@ import android.os.Bundle
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.platform.ComposeView
|
import androidx.compose.ui.platform.ComposeView
|
||||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
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.extractor.comments.CommentsInfoItem
|
||||||
import org.schabi.newpipe.ktx.serializable
|
import org.schabi.newpipe.ktx.serializable
|
||||||
import org.schabi.newpipe.ui.theme.AppTheme
|
import org.schabi.newpipe.ui.theme.AppTheme
|
||||||
|
import org.schabi.newpipe.util.Localization
|
||||||
|
|
||||||
class CommentRepliesFragment : Fragment() {
|
class CommentRepliesFragment : Fragment() {
|
||||||
lateinit var comment: CommentsInfoItem
|
lateinit var comment: CommentsInfoItem
|
||||||
@ -23,6 +25,12 @@ class CommentRepliesFragment : Fragment() {
|
|||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
): View {
|
): View {
|
||||||
comment = requireArguments().serializable<CommentsInfoItem>(COMMENT_KEY)!!
|
comment = requireArguments().serializable<CommentsInfoItem>(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 {
|
return ComposeView(requireContext()).apply {
|
||||||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
||||||
setContent {
|
setContent {
|
||||||
|
Loading…
Reference in New Issue
Block a user