Package 

Class MessageListHeaderKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageListHeader(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Color color, Shape shape, Dp elevation, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function1<RowScope, Unit> leadingContent, Function1<RowScope, Unit> centerContent, Function1<RowScope, Unit> trailingContent) A clean, decoupled UI element that doesn't rely on ViewModels or our custom architecture setup.
      final static Unit DefaultMessageListHeaderCenterContent(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Function1<Channel, Unit> onHeaderTitleClick) Represents the center content of MessageListHeader.
      • Methods inherited from class java.lang.Object

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

      • MessageListHeader

        @Composable() final static Unit MessageListHeader(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Color color, Shape shape, Dp elevation, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function1<RowScope, Unit> leadingContent, Function1<RowScope, Unit> centerContent, Function1<RowScope, Unit> trailingContent)

        A clean, decoupled UI element that doesn't rely on ViewModels or our custom architecture setup. This allows the user to fully govern how the MessageListHeader behaves, by passing in all the data that's required to display it and drive its actions, as well as customize the slot APIs.

        Parameters:
        channel - Channel info to display.
        currentUser - The current user, required for different UI states.
        connectionState - The state of WS connection used to switch between the subtitle and the network loading view.
        modifier - Modifier for styling.
        typingUsers - The list of typing users.
        messageMode - The current message mode, that changes the header content, if we're in a Thread.
        color - The color of the header.
        shape - The shape of the header.
        elevation - The elevation of the header.
        onBackPressed - Handler that propagates the back button click event.
        onHeaderTitleClick - Action handler when the user taps on the header title section.
        onChannelAvatarClick - Action handler called when the user taps on the channel avatar.
        leadingContent - The content shown at the start of the header, by default a BackButton.
        centerContent - The content shown in the middle of the header and represents the core information, by default DefaultMessageListHeaderCenterContent.
        trailingContent - The content shown at the end of the header, by default the channel avatar.
      • DefaultMessageListHeaderCenterContent

        @Composable() final static Unit DefaultMessageListHeaderCenterContent(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Function1<Channel, Unit> onHeaderTitleClick)

        Represents the center content of MessageListHeader. By default shows header title, that handles if we should show a loading view for network, or the channel information.

        Parameters:
        channel - The channel used for the title information.
        currentUser - The current user.
        connectionState - A flag that governs if we show the subtitle or the network loading view.
        modifier - Modifier for styling.
        typingUsers - The list of typing users.
        messageMode - Currently active message mode, used to define the title information.
        onHeaderTitleClick - Handler for when the user taps on the header title section.