From 8ca63c4fa1eee5a83d2cdcf4d308d78f557b5fd7 Mon Sep 17 00:00:00 2001 From: Paul Hitt Date: Fri, 28 Aug 2026 16:23:51 -0400 Subject: [PATCH] Open a chat at the newest message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The size-keyed follow effect animated from the very top on first composition — a tour of the history before landing. A Unit-keyed instant jump runs first; the animated follow keeps handling arrivals. Co-Authored-By: Claude Fable 5 --- app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt index 632a4bd..a5ae665 100644 --- a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt +++ b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt @@ -1263,6 +1263,10 @@ fun ColumnScope.ChatScreen( var draft by remember { mutableStateOf("") } val listState = rememberLazyListState() + // Open AT the newest message — a jump, not a tour of the history. + LaunchedEffect(Unit) { + if (chat.lines.isNotEmpty()) listState.scrollToItem(chat.lines.lastIndex) + } // Follow the conversation as it grows. Without this a reply arrives // off-screen and the app looks like it did nothing. LaunchedEffect(chat.lines.size) {