[Chat] Some tweaks (#10840)

This commit is contained in:
Samuel Newman
2026-06-10 16:38:31 +03:00
committed by GitHub
parent 7379ad3c3b
commit 17ff9af200
2 changed files with 17 additions and 19 deletions
@@ -308,7 +308,13 @@ export function MessagesList({
} else {
flatListRef.current?.scrollToOffset({
offset: height,
animated: hasScrolled && height > prevContentHeight.current,
// only animate when new items were appended - pure layout growth
// (e.g. the composer spacer getting its height on web) should
// snap instantly rather than visibly scrolling
animated:
hasScrolled &&
height > prevContentHeight.current &&
renderItems.length > prevItemCount.current,
})
}
}