From 7ae94ee2e6142c22f3e7e20b15e776920584aa37 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 22 Jun 2024 19:01:02 +0530 Subject: [PATCH] fix(common): temporarily disable collapsible comments feature --- .../dev/msfjarvis/claw/common/comments/CommentEntry.kt | 4 ++-- .../dev/msfjarvis/claw/common/comments/CommentNode.kt | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt index e7de53cd..e9caf95e 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentEntry.kt @@ -130,7 +130,7 @@ private val CommentEntryPadding = 16f.dp internal fun CommentEntry( commentNode: CommentNode, htmlConverter: HTMLConverter, - toggleExpanded: (CommentNode) -> Unit, + @Suppress("UNUSED_PARAMETER") toggleExpanded: (CommentNode) -> Unit, openUserProfile: (String) -> Unit, modifier: Modifier = Modifier, ) { @@ -139,7 +139,7 @@ internal fun CommentEntry( modifier = modifier .fillMaxWidth() - .clickable { toggleExpanded(commentNode) } + /*.clickable { toggleExpanded(commentNode) }*/ .background(MaterialTheme.colorScheme.background) .padding( start = CommentEntryPadding * commentNode.indentLevel, diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentNode.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentNode.kt index 0a6227c8..2c296a89 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentNode.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentNode.kt @@ -103,10 +103,12 @@ private fun LazyListScope.node( toggleExpanded: (CommentNode) -> Unit, openUserProfile: (String) -> Unit, ) { - // Skip the node if neither the node nor its parent is expanded - if (!node.isExpanded && node.parent?.isExpanded == false) { - return - } + /* + // Skip the node if neither the node nor its parent is expanded + if (!node.isExpanded && node.parent?.isExpanded == false) { + return + } + */ item(key = node.comment.shortId) { CommentEntry( commentNode = node,