-
public final class MessageComposerKt
-
-
Method Summary
Modifier and Type Method Description final static UnitMessageComposer(MessageComposerViewModel viewModel, Modifier modifier, Boolean isAttachmentPickerVisible, Function1<Message, Unit> onSendMessage, String sendActionLabel, String saveActionLabel, Function0<Unit> onAttachmentsClick, String attachmentsActionLabel, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function0<Unit> onCancelLinkPreviewClick, Function1<User, Unit> onUserSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelChange, Function0<Unit> onActiveCommandDismiss, AudioRecordingActions recordingActions, Function1<Mention, Unit> onMentionSelected, Function2<RowScope, MessageComposerState, Unit> input)Default MessageComposer component that relies on MessageComposerViewModel to handle data and communicate various events. final static UnitMessageComposer(MessageComposerState messageComposerState, Function2<String, List<Attachment>, Unit> onSendMessage, String sendActionLabel, String saveActionLabel, Modifier modifier, Boolean isAttachmentPickerVisible, Function0<Unit> onAttachmentsClick, String attachmentsActionLabel, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function0<Unit> onCancelLinkPreviewClick, Function1<User, Unit> onUserSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelChange, Function0<Unit> onActiveCommandDismiss, AudioRecordingActions recordingActions, Function1<Mention, Unit> onMentionSelected, Function2<RowScope, MessageComposerState, Unit> input)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. -
-
Method Detail
-
MessageComposer
@Composable() final static Unit MessageComposer(MessageComposerViewModel viewModel, Modifier modifier, Boolean isAttachmentPickerVisible, Function1<Message, Unit> onSendMessage, String sendActionLabel, String saveActionLabel, Function0<Unit> onAttachmentsClick, String attachmentsActionLabel, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function0<Unit> onCancelLinkPreviewClick, Function1<User, Unit> onUserSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelChange, Function0<Unit> onActiveCommandDismiss, AudioRecordingActions recordingActions, Function1<Mention, Unit> onMentionSelected, Function2<RowScope, MessageComposerState, Unit> input)
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.isAttachmentPickerVisible- If the attachment picker is visible or not.onSendMessage- Handler when the user sends a message.sendActionLabel- Semantic / accessibility label for onSendMessage when sending a new message.saveActionLabel- Semantic / accessibility label for onSendMessage when saving an edit.onAttachmentsClick- Handler for the default Attachments integration.attachmentsActionLabel- Semantic / accessibility label for onAttachmentsClick.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.onCancelLinkPreviewClick- Handler when the user taps on the cancel link preview.onUserSelected- Legacy handler that fires only when the user taps a user suggestion item.onCommandSelected- Handler for every tap on a command suggestion item, including taps on disabled items.onAlsoSendToChannelChange- Handler when the "Also send to channel" checkbox is changed.onActiveCommandDismiss- Called when the user taps the dismiss button on the active command chip.recordingActions- The actions that can be performed on an audio recording.onMentionSelected- Handler when the user taps any mention suggestion item.input- Customizable composable that represents the input field for the composer, MessageInput by default.
-
MessageComposer
@Composable() final static Unit MessageComposer(MessageComposerState messageComposerState, Function2<String, List<Attachment>, Unit> onSendMessage, String sendActionLabel, String saveActionLabel, Modifier modifier, Boolean isAttachmentPickerVisible, Function0<Unit> onAttachmentsClick, String attachmentsActionLabel, Function1<String, Unit> onValueChange, Function1<Attachment, Unit> onAttachmentRemoved, Function0<Unit> onCancelAction, Function1<LinkPreview, Unit> onLinkPreviewClick, Function0<Unit> onCancelLinkPreviewClick, Function1<User, Unit> onUserSelected, Function1<Command, Unit> onCommandSelected, Function1<Boolean, Unit> onAlsoSendToChannelChange, Function0<Unit> onActiveCommandDismiss, AudioRecordingActions recordingActions, Function1<Mention, Unit> onMentionSelected, Function2<RowScope, MessageComposerState, Unit> input)
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.sendActionLabel- Semantic / accessibility label for onSendMessage when sending a new message.saveActionLabel- Semantic / accessibility label for onSendMessage when saving an edit.modifier- Modifier for styling.isAttachmentPickerVisible- If the attachment picker is visible or not.onAttachmentsClick- Handler for the default Attachments integration.attachmentsActionLabel- Semantic / accessibility label for onAttachmentsClick.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.onCancelLinkPreviewClick- Handler when the user taps on the cancel link preview.onUserSelected- Legacy handler that fires only when the user taps a user suggestion item.onCommandSelected- Handler when the user taps on a command suggestion item, including taps on disabled items.onAlsoSendToChannelChange- Handler when the "Also send to channel" checkbox is changed.onActiveCommandDismiss- Called when the user taps the dismiss button on the active command chip.recordingActions- The actions that can be performed on an audio recording.onMentionSelected- Handler when the user taps any mention suggestion item.input- Customizable composable that represents the input field for the composer, MessageInput by default.
-
-
-
-