Open chats at latest message
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user