mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-13 21:56:59 +05:30
fix: address regression in comment collapse
This commit is contained in:
parent
8947c3a3bc
commit
764be07cc0
2 changed files with 4 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue