Package-level declarations
Functions
Link copied to clipboard
fun DefaultMessageListHeaderCenterContent(channel: Channel, currentUser: User?, connectionState: ConnectionState, modifier: Modifier = Modifier, typingUsers: List<User> = emptyList(), messageMode: MessageMode = MessageMode.Normal, onHeaderTitleClick: (Channel) -> Unit = {})
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.
Link copied to clipboard
fun MessageListHeader(channel: Channel, currentUser: User?, connectionState: ConnectionState, modifier: Modifier = Modifier, typingUsers: List<User> = emptyList(), messageMode: MessageMode = MessageMode.Normal, color: Color = ChatTheme.colors.barsBackground, shape: Shape = ChatTheme.shapes.header, elevation: Dp = ChatTheme.dimens.headerElevation, onBackPressed: () -> Unit = {}, onHeaderTitleClick: (Channel) -> Unit = {}, onChannelAvatarClick: () -> Unit = {}, leadingContent: @Composable RowScope.() -> Unit = {
DefaultMessageListHeaderLeadingContent(onBackPressed = onBackPressed)
}, centerContent: @Composable RowScope.() -> Unit = {
DefaultMessageListHeaderCenterContent(
modifier = Modifier.weight(1f),
channel = channel,
currentUser = currentUser,
typingUsers = typingUsers,
messageMode = messageMode,
onHeaderTitleClick = onHeaderTitleClick,
connectionState = connectionState,
)
}, trailingContent: @Composable RowScope.() -> Unit = {
DefaultMessageListHeaderTrailingContent(
channel = channel,
currentUser = currentUser,
onClick = onChannelAvatarClick,
)
})
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.