Open chats at latest message
This commit is contained in:
@@ -1666,8 +1666,9 @@ private fun ChatScreen(vm: QMaxViewModel) {
|
||||
|
||||
LaunchedEffect(timeline.size) {
|
||||
if (timeline.isNotEmpty()) {
|
||||
val shouldAutoScroll = previousTimelineSize == 0 || !showScrollToBottom
|
||||
if (shouldAutoScroll) {
|
||||
if (previousTimelineSize == 0) {
|
||||
listState.scrollToItem(timeline.lastIndex)
|
||||
} else if (!showScrollToBottom) {
|
||||
listState.animateScrollToItem(timeline.lastIndex)
|
||||
}
|
||||
previousTimelineSize = timeline.size
|
||||
|
||||
Reference in New Issue
Block a user