diff --git a/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CollapsedCommentCard.kt b/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CollapsedCommentCard.kt index 42214beeb..6e298fc53 100644 --- a/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CollapsedCommentCard.kt +++ b/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CollapsedCommentCard.kt @@ -26,6 +26,8 @@ import com.github.diegoberaldin.raccoonforlemmy.core.utils.toLocalDp import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.CommentModel import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.UserModel +private const val INDENT_AMOUNT = 3 + @Composable fun CollapsedCommentCard( comment: CommentModel, @@ -58,7 +60,7 @@ fun CollapsedCommentCard( ) { Box( modifier = Modifier.padding( - start = (10 * comment.depth).dp + start = (INDENT_AMOUNT * comment.depth).dp ), ) { Column( @@ -102,13 +104,15 @@ fun CollapsedCommentCard( onOptionSelected = onOptionSelected, ) } - Box( - modifier = Modifier - .padding(top = Spacing.xxs) - .width(barWidth) - .height(commentHeight.toLocalDp()) - .background(color = barColor) - ) + if (comment.depth > 0) { + Box( + modifier = Modifier + .padding(top = Spacing.xxs) + .width(barWidth) + .height(commentHeight.toLocalDp()) + .background(color = barColor) + ) + } } } } diff --git a/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CommentCard.kt b/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CommentCard.kt index 71eee0cc0..e5df2d71f 100644 --- a/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CommentCard.kt +++ b/core-commonui/src/commonMain/kotlin/com/github/diegoberaldin/raccoonforlemmy/core/commonui/components/CommentCard.kt @@ -122,7 +122,7 @@ fun CommentCard( onOptionSelected = onOptionSelected, ) } - if (!hideIndent) { + if (!hideIndent && comment.depth > 0) { Box( modifier = Modifier .padding(top = Spacing.xxs)