diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dac9f8f..c75b441b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - The navigation stack has been completely rewritten to better - support larger screens. This also adds some nicer animations - and better support for predictive back. There will continue - to be iterative improvements in this area. + support larger screens - Comment expand/collapse interaction is now driven by a button UI to prevent misclicks @@ -22,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgrade to Compose 2025-05 releases - Increase swipe action trigger distance to compensate for gesture sensitivity changes in Android 16 QPR1 Beta 1 +- Fix regression in collapsing deeply nested comment trees ## [1.55.0] - 2025-02-13 diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsHandler.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsHandler.kt index 6278d498..a10f3567 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsHandler.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsHandler.kt @@ -62,14 +62,7 @@ internal class CommentsHandler { return node.copy(children = updatedChildren) } - val listNode = _listItems.value.toMutableList() - for (i in listNode.indices) { - val node = listNode[i] - if (node.comment.shortId == shortId || node.children.any { it.comment.shortId == shortId }) { - listNode[i] = updateNode(node) - _listItems.value = listNode.toList() - return - } - } + val listNode = _listItems.value.map { updateNode(it) } + _listItems.value = listNode } }