fix repeated loading on bottom section

This commit is contained in:
Diogo
2024-11-04 09:21:08 +00:00
parent 34c10fc12f
commit bfac8bd58a
@@ -1597,7 +1597,7 @@ fun PreloadItems(
scrollDirection == ScrollDirection.Up && lastVisibleItemIndex > (section.maxIndex - remaining) -> {
chatModel.chatItems.size - 1 - section.maxIndex
}
scrollDirection == ScrollDirection.Down && listState.firstVisibleItemIndex < (section.minIndex + remaining) && totalItemsNumber > remaining -> {
scrollDirection == ScrollDirection.Down && section.area != ChatSectionArea.Bottom && listState.firstVisibleItemIndex < (section.minIndex + remaining) && totalItemsNumber > remaining -> {
chatModel.chatItems.size - 1 - section.minIndex
}
else -> null