ScrollToBottomFab

fun BoxScope.ScrollToBottomFab(coroutineScope: CoroutineScope, listState: LazyListState, unreadCount: Int, newestUnreadSender: String? = null)(source)

Jump-to-latest control for the message list.

A bare count answers "how many" but not "from whom", which is what actually decides whether to scroll now or keep reading — so when the newest unread message has a sender, the control widens to name them and keeps the count as the overflow case.

Parameters

coroutineScope

The coroutine scope for launching the scroll animation.

listState

The LazyListState of the message list.

unreadCount

The number of unread messages to display as a badge.

newestUnreadSender

Display name of whoever sent the newest unread message, or null when there is none.