From bfac8bd58a45f920813e679ec9a1e56a599c1705 Mon Sep 17 00:00:00 2001 From: Diogo Date: Mon, 4 Nov 2024 09:21:08 +0000 Subject: [PATCH] fix repeated loading on bottom section --- .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index c0b8970b1e..c3b0413766 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -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