[1.324.*] Pre-release merge (#844)
This commit is contained in:
+2
-3
@@ -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
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ internal data class CommentNode(
|
||||
}
|
||||
|
||||
/**
|
||||
* [CommentNode.equals] and [CommentNode.hashCode] are hand-rolled to drop the
|
||||
* [CommentNode.parent] field from the comparison since it's possible for there to be cycles in
|
||||
* this comparison check. For our purposes we're fine with foregoing the field.
|
||||
* [CommentNode.equals], [CommentNode.toString] and [CommentNode.hashCode] are hand-rolled to drop
|
||||
* the [CommentNode.parent] field from the comparison since it's possible for there to be cycles
|
||||
* in this comparison check. For our purposes we're fine with foregoing the field.
|
||||
*/
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
@@ -65,4 +65,10 @@ internal data class CommentNode(
|
||||
result = 31 * result + isExpanded.hashCode()
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "CommentNode(comment=${comment.shortId}, isPostAuthor=$isPostAuthor, " +
|
||||
"children=${children.size}, isUnread=$isUnread, indentLevel=$indentLevel, " +
|
||||
"isExpanded=$isExpanded)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user