This commit is contained in:
Diogo
2024-09-29 22:13:22 +01:00
parent f03c443cb7
commit f3a517681d
@@ -1426,8 +1426,8 @@ fun BoxWithConstraintsScope.FloatingButtons(
val lastVisibleItem by remember {
derivedStateOf {
if (lastIndexOfVisibleItems >= 0) {
val topVisibleItemIndex = chatItems.value.lastIndex - firstVisibleIndex - lastIndexOfVisibleItems
chatItems.value[topVisibleItemIndex]
val lastVisibleChatItemIndex = chatItems.value.lastIndex - firstVisibleIndex - lastIndexOfVisibleItems
chatItems.value[lastVisibleChatItemIndex]
} else {
null
}