diff --git a/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt b/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt index 37728329..c21f5e5b 100644 --- a/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt +++ b/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt @@ -1,14 +1,10 @@ package dev.msfjarvis.claw.common.comments -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.material.Divider import androidx.compose.material.Surface @@ -47,11 +43,8 @@ fun CommentEntry( comment: Comment, htmlToMarkdown: (html: String) -> String, ) { - val indentLevel = comment.indentLevel.toInt() - 1 - Divider(color = Color.Gray.copy(0.4f)) Row(modifier = Modifier.wrapContentHeight()) { - CommentTreeColors(indentLevel = indentLevel) Column(modifier = Modifier.padding(start = 12.dp, end = 8.dp, top = 4.dp, bottom = 4.dp)) { SubmitterName( text = comment.user.username, @@ -64,21 +57,3 @@ fun CommentEntry( } } } - -@Composable -private fun CommentTreeColors( - indentLevel: Int, - modifier: Modifier = Modifier, -) { - Box(modifier = modifier) { - for (level in 1..indentLevel) { - Box( - modifier = - Modifier.padding(start = (12 + ((level - 1) * 10)).dp) - .fillMaxHeight() - .width(1.dp) - .background(CommentTreeColor[level]) - ) - } - } -} diff --git a/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentTreeColors.kt b/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentTreeColors.kt deleted file mode 100644 index 11401ef9..00000000 --- a/common/src/commonMain/kotlin/dev/msfjarvis/claw/common/comments/CommentTreeColors.kt +++ /dev/null @@ -1,30 +0,0 @@ -package dev.msfjarvis.claw.common.comments - -import androidx.compose.ui.graphics.Color - -object CommentTreeColor { - private val colors = - arrayOf( - Color(0xFFFFC40D), - Color(0xFF2D89EF), - Color(0xFFB91D47), - Color(0xFF00ABA9), - Color(0xFFE3A21A), - Color(0xFF99B433), - Color(0xFF7E3878), - Color(0xFFFFB300), - Color(0xFFFFFFFF), - Color(0xFF00A300), - Color(0xFF2B5797), - Color(0xFF9F00A7), - Color(0xFF603CBA), - Color(0xFFEE1111), - Color(0xFFEFF4FF), - Color(0xFFDA532C), - Color(0xFFFF0097), - Color(0xFF1E7145), - ) - val size = colors.size - - operator fun get(idx: Int): Color = colors[idx % size] -}