1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 04:22:30 +01:00

Replace Spacers with the horizontalArrangement parameter

This commit is contained in:
Isira Seneviratne 2024-06-23 09:16:27 +05:30
parent b9dd7078ad
commit b092fe2c76
2 changed files with 4 additions and 11 deletions

View File

@ -6,11 +6,9 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
@ -76,7 +74,8 @@ fun Comment(comment: CommentsInfoItem) {
modifier = Modifier
.fillMaxWidth()
.clickable { isExpanded = !isExpanded }
.padding(all = 8.dp)
.padding(all = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
if (ImageStrategy.shouldLoadImages()) {
AsyncImage(
@ -95,8 +94,6 @@ fun Comment(comment: CommentsInfoItem) {
)
}
Spacer(modifier = Modifier.width(8.dp))
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
Row(horizontalArrangement = Arrangement.spacedBy(4.dp)) {
if (comment.isPinned) {

View File

@ -6,11 +6,9 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
@ -42,6 +40,7 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
Column(modifier = Modifier.padding(all = 8.dp)) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Row(
@ -53,6 +52,7 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
comment
)
},
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (ImageStrategy.shouldLoadImages()) {
@ -67,8 +67,6 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
)
}
Spacer(modifier = Modifier.width(8.dp))
Column {
Text(text = comment.uploaderName)
@ -82,8 +80,6 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
}
}
Spacer(modifier = Modifier.weight(1f))
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically