Open a chat at the newest message
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3b6bdb43a3
commit
8ca63c4fa1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user