Package 

Class ChannelHeaderKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit ChannelHeader(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, String onHeaderTitleClickLabel, Function1<Channel, Unit> onChannelAvatarClick, String onChannelAvatarClickLabel, 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.
      • Methods inherited from class java.lang.Object

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

      • ChannelHeader

        @Composable() final static Unit ChannelHeader(Channel channel, User currentUser, ConnectionState connectionState, Modifier modifier, List<User> typingUsers, MessageMode messageMode, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, String onHeaderTitleClickLabel, Function1<Channel, Unit> onChannelAvatarClick, String onChannelAvatarClickLabel, 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 ChannelHeader 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.
        onBackPressed - Handler that propagates the back button click event.
        onHeaderTitleClick - Action handler when the user taps on the header title section.
        onHeaderTitleClickLabel - Semantic / accessibility label for onHeaderTitleClick.
        onChannelAvatarClick - Action handler called when the user taps on the channel avatar.
        onChannelAvatarClickLabel - Semantic / accessibility label for onChannelAvatarClick.
        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 DefaultChannelHeaderCenterContent.
        trailingContent - The content shown at the end of the header, by default the channel avatar.