mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 09:57:04 +05:30
fix(common): mark CommentNode#findTopMostParent
as tailrec
This commit is contained in:
parent
5061843779
commit
8735f7f8e8
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ internal fun setExpanded(commentNode: CommentNode, expanded: Boolean): CommentNo
|
||||||
return commentNode
|
return commentNode
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun findTopMostParent(node: CommentNode): CommentNode {
|
internal tailrec fun findTopMostParent(node: CommentNode): CommentNode {
|
||||||
val parent = node.parent
|
val parent = node.parent
|
||||||
return if (parent != null) {
|
return if (parent != null) {
|
||||||
findTopMostParent(parent)
|
findTopMostParent(parent)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue