Package-level declarations
Types
Link copied to clipboard
typealias ChannelViewModelFactoryProvider = (context: Context, selection: ChatMessageSelection) -> ChannelViewModelFactory?
A lambda function that provides a ChannelViewModelFactory for managing messages within a selected channel.
Link copied to clipboard
The mode for displaying the list content in the chat screen.
Link copied to clipboard
data class ChatMessageSelection(val channelId: String? = null, val messageId: String? = null, val parentMessageId: String? = null) : Serializable
Represents the selection of a message within a channel.
Functions
Link copied to clipboard
fun ChatsScreen(modifier: Modifier = Modifier, navigator: ThreePaneNavigator = rememberThreePaneNavigator(), channelListViewModelFactory: ChannelListViewModelFactory = ChannelListViewModelFactory(), mentionListViewModelFactory: MentionListViewModelFactory = MentionListViewModelFactory(), threadsViewModelFactory: ThreadsViewModelFactory = ThreadsViewModelFactory(QueryThreadsRequest()), channelViewModelFactoryProvider: ChannelViewModelFactoryProvider = DefaultChannelViewModelFactoryProvider(), title: String = "Stream Chat", searchMode: SearchMode = SearchMode.None, listContentMode: ChatListContentMode = ChatListContentMode.Channels, onBackPress: () -> Unit = {}, onListTopBarAvatarClick: (User?) -> Unit = {}, onListTopBarActionClick: () -> Unit = {}, onDetailTopBarTitleClick: (channel: Channel) -> Unit? = null, onDetailTopBarAvatarClick: (channel: Channel) -> Unit? = null, onViewChannelInfoClick: (channel: Channel) -> Unit = {}, listTopBarContent: @Composable () -> Unit = {
DefaultListTopBarContent(
viewModelFactory = channelListViewModelFactory,
title = title,
onAvatarClick = onListTopBarAvatarClick,
onActionClick = onListTopBarActionClick,
)
}, listBottomBarContent: @Composable () -> Unit = {}, detailTopBarContent: @Composable (viewModelFactory: ChannelViewModelFactory, BackAction) -> Unit = { viewModelFactory, backAction ->
DefaultDetailTopBarContent(
viewModelFactory = viewModelFactory,
backAction = backAction,
onTitleClick = onDetailTopBarTitleClick,
onAvatarClick = onDetailTopBarAvatarClick,
)
}, detailBottomBarContent: @Composable (viewModelFactory: ChannelViewModelFactory) -> Unit = { viewModelFactory ->
DefaultDetailBottomBarContent(viewModelFactory = viewModelFactory)
}, infoContent: @Composable (arguments: Any?) -> Unit = {})
Represents a complete screen for chat, including a list of channels, threads, and messages. The layout adapts based on the screen size, showing a single-pane layout on smaller screens and a dual-pane layout on larger screens with an optional info pane.