Package 

Class MessagesLazyListState


  • 
    public final class MessagesLazyListState
    
                        

    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.

    • Constructor Detail

      • MessagesLazyListState

        MessagesLazyListState(LazyListState lazyListState, MessagesLazyListState.MessageOffsetHandler messageOffsetHandler)
        Parameters:
        lazyListState - State of the lazy list that represents the list of messages.
        messageOffsetHandler - The handler that calculates the focused message offset.
    • Method Detail

      • updateParentSize

         final Unit updateParentSize(IntSize parentSize)

        Updates the list parent holder. By default will update the size of Messages composable.

        Parameters:
        parentSize - The size of the parent view.
      • updateFocusedMessageSize

         final Unit updateFocusedMessageSize(IntSize focusedMessageSize)

        Updates the size of the focused message.

        Parameters:
        focusedMessageSize - The size of the message view we wish to focus to on the screen.