Open chats at latest message

This commit is contained in:
sevenhill
2026-07-07 14:35:26 +03:00
parent af84343e19
commit b2766ebbe9
@@ -1666,8 +1666,9 @@ private fun ChatScreen(vm: QMaxViewModel) {
LaunchedEffect(timeline.size) { LaunchedEffect(timeline.size) {
if (timeline.isNotEmpty()) { if (timeline.isNotEmpty()) {
val shouldAutoScroll = previousTimelineSize == 0 || !showScrollToBottom if (previousTimelineSize == 0) {
if (shouldAutoScroll) { listState.scrollToItem(timeline.lastIndex)
} else if (!showScrollToBottom) {
listState.animateScrollToItem(timeline.lastIndex) listState.animateScrollToItem(timeline.lastIndex)
} }
previousTimelineSize = timeline.size previousTimelineSize = timeline.size