Package 

Class MessageComposerKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit MessageComposer(MessageComposerViewModel viewModel, Modifier modifier, Function1<Message, Unit> onSendMessage, Function0<Unit> onAttachmentsClick, Function0<Unit> onCommandsClick, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function1<User, Unit> onMentionSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelSelected, AudioRecordingActions recordingActions, Function2<ColumnScope, MessageComposerState, Unit> headerContent, Function2<ColumnScope, MessageComposerState, Unit> footerContent, Function1<List<User>, Unit> mentionPopupContent, Function1<List<Command>, Unit> commandPopupContent, Function2<RowScope, MessageComposerState, Unit> integrations, Function1<MessageComposerState, Unit> label, Function2<RowScope, MessageComposerState, Unit> input, Function2<RowScope, MessageComposerState, Unit> audioRecordingContent, Function1<MessageComposerState, Unit> trailingContent) Default MessageComposer component that relies on MessageComposerViewModel to handle data and communicate various events.
      final static Unit MessageComposer(MessageComposerState messageComposerState, Function2<String, List<Attachment>, Unit> onSendMessage, Modifier modifier, Function0<Unit> onAttachmentsClick, Function0<Unit> onCommandsClick, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function1<User, Unit> onMentionSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelSelected, AudioRecordingActions recordingActions, Function2<ColumnScope, MessageComposerState, Unit> headerContent, Function2<ColumnScope, MessageComposerState, Unit> footerContent, Function1<List<User>, Unit> mentionPopupContent, Function1<List<Command>, Unit> commandPopupContent, Function2<RowScope, MessageComposerState, Unit> integrations, Function1<MessageComposerState, Unit> label, Function2<RowScope, MessageComposerState, Unit> input, Function2<RowScope, MessageComposerState, Unit> audioRecordingContent, Function1<MessageComposerState, Unit> trailingContent) Clean version of the MessageComposer that doesn't rely on ViewModels, so the user can provide a manual way to handle and represent data and various operations.
      final static Unit DefaultMessageComposerHeaderContent(MessageComposerState messageComposerState, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick) Represents the default content shown at the top of the message composer component.
      final static Unit DefaultMessageComposerFooterContent(MessageComposerState messageComposerState, Function1<Boolean, Unit> onAlsoSendToChannelSelected) Represents the default content shown at the bottom of the message composer component.
      • Methods inherited from class java.lang.Object

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

      • MessageComposer

        @Composable() final static Unit MessageComposer(MessageComposerViewModel viewModel, Modifier modifier, Function1<Message, Unit> onSendMessage, Function0<Unit> onAttachmentsClick, Function0<Unit> onCommandsClick, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function1<User, Unit> onMentionSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelSelected, AudioRecordingActions recordingActions, Function2<ColumnScope, MessageComposerState, Unit> headerContent, Function2<ColumnScope, MessageComposerState, Unit> footerContent, Function1<List<User>, Unit> mentionPopupContent, Function1<List<Command>, Unit> commandPopupContent, Function2<RowScope, MessageComposerState, Unit> integrations, Function1<MessageComposerState, Unit> label, Function2<RowScope, MessageComposerState, Unit> input, Function2<RowScope, MessageComposerState, Unit> audioRecordingContent, Function1<MessageComposerState, Unit> trailingContent)

        Default MessageComposer component that relies on MessageComposerViewModel to handle data and communicate various events.

        Parameters:
        viewModel - The ViewModel that provides pieces of data to show in the composer, like the currently selected integration data or the user input.
        modifier - Modifier for styling.
        onSendMessage - Handler when the user sends a message.
        onAttachmentsClick - Handler for the default Attachments integration.
        onCommandsClick - Handler for the default Commands integration.
        onValueChange - Handler when the input field value changes.
        onAttachmentRemoved - Handler when the user taps on the cancel/delete attachment action.
        onCancelAction - Handler for the cancel button on Message actions, such as Edit and Reply.
        onLinkPreviewClick - Handler when the user taps on a link preview.
        onMentionSelected - Handler when the user taps on a mention suggestion item.
        onCommandSelected - Handler when the user taps on a command suggestion item.
        onAlsoSendToChannelSelected - Handler when the user checks the also send to channel checkbox.
        recordingActions - The actions that can be performed on an audio recording.
        headerContent - The content shown at the top of the message composer.
        footerContent - The content shown at the bottom of the message composer.
        mentionPopupContent - Customizable composable that represents the mention suggestions popup.
        commandPopupContent - Customizable composable that represents the instant command suggestions popup.
        integrations - A view that represents custom integrations.
        label - Customizable composable that represents the input field label (hint).
        input - Customizable composable that represents the input field for the composer, MessageInput by default.
        audioRecordingContent - Customizable composable used for displaying audio recording information while audio recording is in progress.
        trailingContent - Customizable composable that represents the trailing content of the composer, send button by default.
      • MessageComposer

        @Composable() final static Unit MessageComposer(MessageComposerState messageComposerState, Function2<String, List<Attachment>, Unit> onSendMessage, Modifier modifier, Function0<Unit> onAttachmentsClick, Function0<Unit> onCommandsClick, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function1<User, Unit> onMentionSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelSelected, AudioRecordingActions recordingActions, Function2<ColumnScope, MessageComposerState, Unit> headerContent, Function2<ColumnScope, MessageComposerState, Unit> footerContent, Function1<List<User>, Unit> mentionPopupContent, Function1<List<Command>, Unit> commandPopupContent, Function2<RowScope, MessageComposerState, Unit> integrations, Function1<MessageComposerState, Unit> label, Function2<RowScope, MessageComposerState, Unit> input, Function2<RowScope, MessageComposerState, Unit> audioRecordingContent, Function1<MessageComposerState, Unit> trailingContent)

        Clean version of the MessageComposer that doesn't rely on ViewModels, so the user can provide a manual way to handle and represent data and various operations.

        Parameters:
        messageComposerState - The state of the message input.
        onSendMessage - Handler when the user wants to send a message.
        modifier - Modifier for styling.
        onAttachmentsClick - Handler for the default Attachments integration.
        onCommandsClick - Handler for the default Commands integration.
        onValueChange - Handler when the input field value changes.
        onAttachmentRemoved - Handler when the user taps on the cancel/delete attachment action.
        onCancelAction - Handler for the cancel button on Message actions, such as Edit and Reply.
        onMentionSelected - Handler when the user taps on a mention suggestion item.
        onCommandSelected - Handler when the user taps on a command suggestion item.
        onAlsoSendToChannelSelected - Handler when the user checks the also send to channel checkbox.
        recordingActions - The actions that can be performed on an audio recording.
        headerContent - The content shown at the top of the message composer.
        footerContent - The content shown at the bottom of the message composer.
        mentionPopupContent - Customizable composable that represents the mention suggestions popup.
        commandPopupContent - Customizable composable that represents the instant command suggestions popup.
        integrations - A view that represents custom integrations.
        label - Customizable composable that represents the input field label (hint).
        input - Customizable composable that represents the input field for the composer, MessageInput by default.
        audioRecordingContent - Customizable composable used for displaying audio recording information while audio recording is in progress.
        trailingContent - Customizable composable that represents the trailing content of the composer, send button by default.
      • DefaultMessageComposerHeaderContent

        @Composable() final static Unit DefaultMessageComposerHeaderContent(MessageComposerState messageComposerState, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick)

        Represents the default content shown at the top of the message composer component.

        Parameters:
        messageComposerState - The state of the message composer.
        onCancelAction - Handler for the cancel button on Message actions, such as Edit and Reply.
        onLinkPreviewClick - Handler when the user taps on a link preview.
      • DefaultMessageComposerFooterContent

        @Deprecated(message = Use ChatComponentFactory.MessageComposerFooterContent to customize the footer content, level = DeprecationLevel.WARNING)@Composable() final static Unit DefaultMessageComposerFooterContent(MessageComposerState messageComposerState, Function1<Boolean, Unit> onAlsoSendToChannelSelected)

        Represents the default content shown at the bottom of the message composer component.

        Parameters:
        messageComposerState - The state of the message composer.
        onAlsoSendToChannelSelected - Handler when the user checks the also send to channel checkbox.