mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Slightly improve comment replies header spacing
This commit is contained in:
parent
ef56dea817
commit
9d8a79b0bd
@ -21,6 +21,7 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
|
||||
import androidx.compose.ui.res.pluralStringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.tooling.preview.datasource.LoremIpsum
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.paging.LoadState
|
||||
import androidx.paging.Pager
|
||||
@ -146,10 +147,13 @@ private fun CommentRepliesDialogPreview() {
|
||||
isPinned = true,
|
||||
isHeartedByUploader = true
|
||||
)
|
||||
val replies = (1..10).map {
|
||||
val replies = (1..10).map { i ->
|
||||
CommentsInfoItem(
|
||||
commentText = Description("Reply $it", Description.PLAIN_TEXT),
|
||||
uploaderName = "Test"
|
||||
commentText = Description(
|
||||
"Reply $i: ${LoremIpsum(i * i).values.first()}",
|
||||
Description.PLAIN_TEXT,
|
||||
),
|
||||
uploaderName = LoremIpsum(11 - i).values.first()
|
||||
)
|
||||
}
|
||||
val flow = flowOf(PagingData.from(replies))
|
||||
|
@ -22,6 +22,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.tooling.preview.datasource.LoremIpsum
|
||||
import androidx.compose.ui.unit.dp
|
||||
import coil.compose.AsyncImage
|
||||
import org.schabi.newpipe.R
|
||||
@ -37,7 +38,7 @@ import org.schabi.newpipe.util.image.ImageStrategy
|
||||
fun CommentRepliesHeader(comment: CommentsInfoItem) {
|
||||
val context = LocalContext.current
|
||||
|
||||
Column(modifier = Modifier.padding(8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Column(modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
@ -114,7 +115,6 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
|
||||
DescriptionText(
|
||||
description = comment.commentText,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = Modifier.padding(8.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -124,7 +124,7 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
|
||||
@Composable
|
||||
fun CommentRepliesHeaderPreview() {
|
||||
val comment = CommentsInfoItem(
|
||||
commentText = Description("Hello world!", Description.PLAIN_TEXT),
|
||||
commentText = Description(LoremIpsum(50).values.first(), Description.PLAIN_TEXT),
|
||||
uploaderName = "Test really long lorem ipsum dolor sit",
|
||||
likeCount = 1000,
|
||||
isPinned = true,
|
||||
|
Loading…
Reference in New Issue
Block a user