mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-08 20:38:41 +01:00
fix load more comments on last comment (#510)
This commit is contained in:
parent
bb3b057e99
commit
cc81885754
@ -5,7 +5,7 @@ import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.CommentModel
|
||||
internal fun List<CommentModel>.populateLoadMoreComments() = mapIndexed { idx, comment ->
|
||||
val hasMoreComments = (comment.comments ?: 0) > 0
|
||||
val isNextCommentNotChild =
|
||||
idx < lastIndex && this[idx + 1].depth <= comment.depth
|
||||
(idx < lastIndex && this[idx + 1].depth <= comment.depth) || idx == lastIndex
|
||||
comment.copy(loadMoreButtonVisible = hasMoreComments && isNextCommentNotChild)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user