mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 00:37:03 +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
|
@ -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