Package 

Class MessageListKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageList(MessageListViewModel viewModel, Modifier modifier, PaddingValues contentPadding, MessagesLazyListState messagesLazyListState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, Function1<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrollToBottom, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottomClicked, Function0<Unit> onScrollToFirstUnreadClicked, Function0<Unit> onDismissUnreadLabel, Function0<Unit> onPauseAudioRecordingAttachments) Default MessageList component, that relies on MessageListViewModel to connect all the data handling operations.
      final static Unit MessageList(MessageListState currentState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, Modifier modifier, PaddingValues contentPadding, MessagesLazyListState messagesLazyListState, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrolledToBottom, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottom, Function0<Unit> onScrollToFirstUnread, Function0<Unit> onDismissUnreadLabel, Function0<Unit> onPauseAudioRecordingAttachments, Function1<MessageListItemState, MessageItemParams> messageItemParams) Clean representation of the MessageList that is decoupled from ViewModels.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • MessageList

        @Composable() final static Unit MessageList(MessageListViewModel viewModel, Modifier modifier, PaddingValues contentPadding, MessagesLazyListState messagesLazyListState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, Function1<Message, Unit> onThreadClick, Function1<Message, Unit> onLongItemClick, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrollToBottom, Function1<Message, Unit> onReply, Function1<MediaGalleryPreviewResult, Unit> onMediaGalleryPreviewResult, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottomClicked, Function0<Unit> onScrollToFirstUnreadClicked, Function0<Unit> onDismissUnreadLabel, Function0<Unit> onPauseAudioRecordingAttachments)

        Default MessageList component, that relies on MessageListViewModel to connect all the data handling operations. It also delegates events to the ViewModel to handle, like long item clicks and pagination.

        Parameters:
        viewModel - The ViewModel that stores all the data and business logic required to show a list of messages.
        modifier - Modifier for styling.
        contentPadding - Padding values to be applied to the message list surrounding the content inside.
        messagesLazyListState - State of the lazy list that represents the list of messages.
        verticalArrangement - Vertical arrangement of the regular message list.
        threadsVerticalArrangement - Vertical arrangement of the thread message list.
        onThreadClick - Handler when the user taps on the message, while there's a thread going.
        onLongItemClick - Handler for when the user long taps on a message and selects it.
        onMessagesPageStartReached - Handler for pagination when the end of the oldest messages has been reached.
        onLastVisibleMessageChanged - Handler that notifies us when the user scrolls and the last visible message changes.
        onScrollToBottom - Handler when the user reaches the bottom.
        onMediaGalleryPreviewResult - Handler when the user selects an option in the Media Gallery Preview screen.
        onMessagesPageEndReached - Handler for pagination when the end of newest messages have been reached.
        onScrollToBottomClicked - Handler when the user requests to scroll to the bottom of the messages list.
        onScrollToFirstUnreadClicked - Handler when the user taps the scroll-to-first-unread pill.
        onDismissUnreadLabel - Handler when the user dismisses the scroll-to-first-unread pill via its close affordance.
        onPauseAudioRecordingAttachments - Handler for lifecycle events.
      • MessageList

        @Composable() final static Unit MessageList(MessageListState currentState, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, Modifier modifier, PaddingValues contentPadding, MessagesLazyListState messagesLazyListState, Function0<Unit> onMessagesPageStartReached, Function1<Message, Unit> onLastVisibleMessageChanged, Function0<Unit> onScrolledToBottom, Function1<String, Unit> onMessagesPageEndReached, Function1<Function0<Unit>, Unit> onScrollToBottom, Function0<Unit> onScrollToFirstUnread, Function0<Unit> onDismissUnreadLabel, Function0<Unit> onPauseAudioRecordingAttachments, Function1<MessageListItemState, MessageItemParams> messageItemParams)

        Clean representation of the MessageList that is decoupled from ViewModels. This components allows users to connect the UI to their own data providers, as it relies on pure state.

        Parameters:
        currentState - The state of the component, represented by MessageListState.
        verticalArrangement - Vertical arrangement of the regular message list.
        threadsVerticalArrangement - Vertical arrangement of the thread message list.
        modifier - Modifier for styling.
        contentPadding - Padding values to be applied to the message list surrounding the content inside.
        messagesLazyListState - State of the lazy list that represents the list of messages.
        onMessagesPageStartReached - Handler for pagination.
        onLastVisibleMessageChanged - Handler that notifies us when the user scrolls and the last visible message changes.
        onScrolledToBottom - Handler when the user scrolls to the bottom.
        onMessagesPageEndReached - Handler for pagination when the end of newest messages have been reached.
        onScrollToBottom - Handler when the user requests to scroll to the bottom of the messages list.
        onScrollToFirstUnread - Handler when the user taps the scroll-to-first-unread pill.
        onDismissUnreadLabel - Handler when the user dismisses the scroll-to-first-unread pill via its close affordance.
        onPauseAudioRecordingAttachments - Handler for lifecycle events.
        messageItemParams - Factory that builds MessageItemParams for each message list item.