From 5c9bb49ff83362e1816b2c9bc5d36aecb1863569 Mon Sep 17 00:00:00 2001 From: Diogo Date: Sun, 29 Sep 2024 21:59:04 +0100 Subject: [PATCH] uncessary code --- .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ded96b8ed4..27479bcd53 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 @@ -1337,8 +1337,8 @@ fun BoxWithConstraintsScope.FloatingButtons( var firstVisibleIndex by remember { mutableStateOf(listState.firstVisibleItemIndex) } var lastIndexOfVisibleItems by remember { mutableStateOf(listState.layoutInfo.visibleItemsInfo.lastIndex) } var firstItemIsVisible by remember { mutableStateOf(firstVisibleIndex == 0) } - var nearBottomIndex by remember { mutableStateOf(-1) } - var isNearBottom by remember { mutableStateOf(true) } + var nearBottomIndex by remember { mutableStateOf(-1) } + var isNearBottom by remember { mutableStateOf(true) } LaunchedEffect(listState) { snapshotFlow { listState.firstVisibleItemIndex } @@ -1362,7 +1362,7 @@ fun BoxWithConstraintsScope.FloatingButtons( elapsedOffset += it.size } } - + isNearBottom = (visibleItemsInfo.firstOrNull()?.index ?: 0) <= nearBottomIndex } }