1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3183 Chats | Enhancement | Smoother scrolling when opening chat on unread messages (#2417)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Evgenii Kozlov 2025-05-20 16:40:25 +02:00 committed by GitHub
parent 300709aaa2
commit 945c4865c7
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 7 deletions

View file

@ -383,7 +383,11 @@ fun ChatScreen(
if (index >= 0) {
snapshotFlow { lazyListState.layoutInfo.totalItemsCount }
.first { it > index }
lazyListState.animateScrollToItem(index)
if (intent.smooth) {
lazyListState.animateScrollToItem(index)
} else {
lazyListState.scrollToItem(index)
}
awaitFrame()
} else {
Timber.d("DROID-2966 COMPOSE Could not find the scrolling target for the intent")