Class AiMessagesScreenKt
-
- All Implemented Interfaces:
public final class AiMessagesScreenKt
-
-
Method Summary
Modifier and Type Method Description final static UnitAiMessagesScreen(MessagesViewModelFactory viewModelFactory, Boolean isAiStarted, Function0<Unit> onStartAiAssistant, Function0<Unit> onStopAiAssistant, Boolean showHeader, TypingState typingState, ReactionSorting reactionSorting, Function0<Unit> onBackPressed, Function1<LinkPreview, Unit> onComposerLinkPreviewClick, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserAvatarClick, Boolean skipPushNotification, Boolean skipEnrichUrl, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<BoxScope, Unit> aiStartButton, Function1<Function0<Unit>, Unit> topBarContent, Function1<Boolean, Unit> bottomBarContent)This is a root Messages screen component for AI assistant, that provides the necessary ViewModels and connects all the data handling operations, as well as some basic actions, like back pressed handling. -
-
Method Detail
-
AiMessagesScreen
@Composable() final static Unit AiMessagesScreen(MessagesViewModelFactory viewModelFactory, Boolean isAiStarted, Function0<Unit> onStartAiAssistant, Function0<Unit> onStopAiAssistant, Boolean showHeader, TypingState typingState, ReactionSorting reactionSorting, Function0<Unit> onBackPressed, Function1<LinkPreview, Unit> onComposerLinkPreviewClick, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserAvatarClick, Boolean skipPushNotification, Boolean skipEnrichUrl, Arrangement.Vertical verticalArrangement, Arrangement.Vertical threadsVerticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<BoxScope, Unit> aiStartButton, Function1<Function0<Unit>, Unit> topBarContent, Function1<Boolean, Unit> bottomBarContent)
This is a root Messages screen component for AI assistant, that provides the necessary ViewModels and connects all the data handling operations, as well as some basic actions, like back pressed handling.
Because this screen can be shown only if there is an active/selected Channel, the user must provide a viewModelFactory that contains the channel ID, in order to load up all the data. Otherwise, we can't show the UI.
- Parameters:
viewModelFactory- The factory used to build ViewModels and power the behavior.isAiStarted- If the AI assistant is started or not.onStartAiAssistant- Handler for when the user taps on the Start AI button.onStopAiAssistant- Handler for when the user taps on the Stop AI button.showHeader- If we're showing the header or not.typingState- The current typing state of the channel.reactionSorting- The sorting type for reactions.onBackPressed- Handler for when the user taps on the Back button and/or the system back button.onComposerLinkPreviewClick- Handler for when the user taps on a link preview in the composer.onHeaderTitleClick- Handler for when the user taps on the header section.onChannelAvatarClick- Handler called when the user taps on the channel avatar.onMessageLinkClick- Handler for when the user taps on a link in a message.onUserAvatarClick- Handler when users avatar is clicked.skipPushNotification- If new messages should skip triggering a push notification when sent.skipEnrichUrl- If new messages being sent, or existing ones being updated should skip enriching the URL.verticalArrangement- Vertical arrangement of the regular message list.threadsVerticalArrangement- Vertical arrangement of the thread message list.threadMessagesStart- Thread messages start at the bottom or top of the screen.topBarContent- custom top bar content to be displayed on top of the messages list.bottomBarContent- custom bottom bar content to be displayed at the bottom of the messages list.
-
-
-
-