MessagesLazyListState
data class MessagesLazyListState(val lazyListState: LazyListState, messageOffsetHandler: MessagesLazyListState.MessageOffsetHandler = defaultOffsetHandler)
Provides a wrapper around lazy list state to be used with Messages composable. It is used to keep track of the focused message offset needed to center the focused message in the scroll list.
Parameters
lazyListState
State of the lazy list that represents the list of messages. Useful for controlling the scroll state.
messageOffsetHandler
The handler that calculates the focused message offset.
Constructors
Link copied to clipboard
constructor(lazyListState: LazyListState, messageOffsetHandler: MessagesLazyListState.MessageOffsetHandler = defaultOffsetHandler)
Types
Link copied to clipboard
Handler that calculates the message offset that will be applied to the focused message. Implements Serializable so that it can be saved using Saver to persist the custom implementation of the handler across compositions.
Functions
Link copied to clipboard
Updates the size of the focused message.
Link copied to clipboard
Updates the list parent holder. By default will update the size of Messages composable.