mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-23 08:54:05 +00:00
Fix text color in bottom sheet
This commit is contained in:
parent
f9340ae604
commit
5fffee2c7d
@ -3,8 +3,6 @@ package org.schabi.newpipe.fragments.list.comments
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Surface
|
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.compose.content
|
import androidx.fragment.compose.content
|
||||||
@ -20,11 +18,9 @@ class CommentsFragment : Fragment() {
|
|||||||
savedInstanceState: Bundle?
|
savedInstanceState: Bundle?
|
||||||
) = content {
|
) = content {
|
||||||
AppTheme {
|
AppTheme {
|
||||||
Surface(color = MaterialTheme.colorScheme.background) {
|
|
||||||
CommentSection()
|
CommentSection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
@ -50,6 +50,7 @@ fun CommentSection(
|
|||||||
val nestedScrollInterop = rememberNestedScrollInteropConnection()
|
val nestedScrollInterop = rememberNestedScrollInteropConnection()
|
||||||
val state = rememberLazyListState()
|
val state = rememberLazyListState()
|
||||||
|
|
||||||
|
Surface(color = MaterialTheme.colorScheme.background) {
|
||||||
LazyColumnScrollbar(state = state) {
|
LazyColumnScrollbar(state = state) {
|
||||||
LazyColumn(modifier = Modifier.nestedScroll(nestedScrollInterop), state = state) {
|
LazyColumn(modifier = Modifier.nestedScroll(nestedScrollInterop), state = state) {
|
||||||
if (parentComment != null) {
|
if (parentComment != null) {
|
||||||
@ -82,6 +83,7 @@ fun CommentSection(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class CommentDataProvider : PreviewParameterProvider<PagingData<CommentsInfoItem>> {
|
private class CommentDataProvider : PreviewParameterProvider<PagingData<CommentsInfoItem>> {
|
||||||
private val notLoading = LoadState.NotLoading(true)
|
private val notLoading = LoadState.NotLoading(true)
|
||||||
@ -116,11 +118,9 @@ private fun CommentSectionPreview(
|
|||||||
@PreviewParameter(CommentDataProvider::class) pagingData: PagingData<CommentsInfoItem>
|
@PreviewParameter(CommentDataProvider::class) pagingData: PagingData<CommentsInfoItem>
|
||||||
) {
|
) {
|
||||||
AppTheme {
|
AppTheme {
|
||||||
Surface(color = MaterialTheme.colorScheme.background) {
|
|
||||||
CommentSection(commentsFlow = flowOf(pagingData))
|
CommentSection(commentsFlow = flowOf(pagingData))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Preview(name = "Light mode", uiMode = Configuration.UI_MODE_NIGHT_NO)
|
@Preview(name = "Light mode", uiMode = Configuration.UI_MODE_NIGHT_NO)
|
||||||
@Preview(name = "Dark mode", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
@Preview(name = "Dark mode", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
||||||
@ -142,8 +142,6 @@ private fun CommentRepliesPreview() {
|
|||||||
val flow = flowOf(PagingData.from(replies))
|
val flow = flowOf(PagingData.from(replies))
|
||||||
|
|
||||||
AppTheme {
|
AppTheme {
|
||||||
Surface(color = MaterialTheme.colorScheme.background) {
|
|
||||||
CommentSection(parentComment = comment, commentsFlow = flow)
|
CommentSection(parentComment = comment, commentsFlow = flow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user