mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 04:22:30 +01:00
Set view strategy
This commit is contained in:
parent
e92ba8f5d1
commit
5841eaa6d7
@ -6,6 +6,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.paging.Pager
|
||||
import androidx.paging.PagingConfig
|
||||
@ -23,6 +24,7 @@ class CommentRepliesFragment : Fragment() {
|
||||
): View {
|
||||
comment = requireArguments().serializable<CommentsInfoItem>(COMMENT_KEY)!!
|
||||
return ComposeView(requireContext()).apply {
|
||||
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
|
||||
setContent {
|
||||
val flow = remember(comment) {
|
||||
Pager(PagingConfig(pageSize = 20, enablePlaceholders = false)) {
|
||||
|
Loading…
Reference in New Issue
Block a user