Package-level declarations
Types
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.
Link copied to clipboard
typealias MessagesViewModelFactoryProvider = (context: Context, selection: ChatMessageSelection) -> MessagesViewModelFactory?
A lambda function that provides a MessagesViewModelFactory for managing messages within a selected channel.
Functions
Link copied to clipboard
fun ChatsScreen( modifier: Modifier = Modifier, navigator: ThreePaneNavigator = rememberThreePaneNavigator(), channelViewModelFactory: ChannelViewModelFactory = ChannelViewModelFactory(), mentionListViewModelFactory: MentionListViewModelFactory = MentionListViewModelFactory(), threadsViewModelFactory: ThreadsViewModelFactory = ThreadsViewModelFactory(), messagesViewModelFactoryProvider: MessagesViewModelFactoryProvider = DefaultMessagesViewModelFactoryProvider(), title: String = "Stream Chat", searchMode: SearchMode = SearchMode.None, listContentMode: ChatListContentMode = ChatListContentMode.Channels, onBackPress: () -> Unit = {}, onListTopBarAvatarClick: (User?) -> Unit = {}, onListTopBarActionClick: () -> Unit = {}, onDetailTopBarTitleClick: (channel: Channel) -> Unit = {}, onViewChannelInfoClick: (channel: Channel) -> Unit = {}, listTopBarContent: @Composable () -> Unit = {
DefaultListTopBarContent(
viewModelFactory = channelViewModelFactory,
title = title,
onAvatarClick = onListTopBarAvatarClick,
onActionClick = onListTopBarActionClick,
)
}, listBottomBarContent: @Composable () -> Unit = {}, detailTopBarContent: @Composable (viewModelFactory: MessagesViewModelFactory, BackAction) -> Unit = { viewModelFactory, backAction ->
DefaultDetailTopBarContent(
viewModelFactory = viewModelFactory,
backAction = backAction,
onTitleClick = onDetailTopBarTitleClick,
)
}, detailBottomBarContent: @Composable (viewModelFactory: MessagesViewModelFactory) -> 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.