AttachmentPickerActions

data class AttachmentPickerActions(val onAttachmentItemSelected: (AttachmentPickerItemState) -> Unit, val onAttachmentsSelected: (List<Attachment>) -> Unit, val onCreatePollClick: () -> Unit, val onCreatePoll: (CreatePollParams) -> Unit, val onCreatePollDismissed: () -> Unit, val onCommandSelected: (Command) -> Unit, val onDismiss: () -> Unit)

Actions that can be performed in the attachment picker.

Each property maps a user gesture or lifecycle event to a handler. To customise individual actions, construct a new instance overriding only the properties you need, using the companion object factories as a starting point.

Constructors

Link copied to clipboard
constructor(onAttachmentItemSelected: (AttachmentPickerItemState) -> Unit, onAttachmentsSelected: (List<Attachment>) -> Unit, onCreatePollClick: () -> Unit, onCreatePoll: (CreatePollParams) -> Unit, onCreatePollDismissed: () -> Unit, onCommandSelected: (Command) -> Unit, onDismiss: () -> Unit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Called when a user taps an attachment item to select or deselect it inside the in-app attachment browser.

Link copied to clipboard

Called when attachments are confirmed and should be added to the composer. Receives the list of Attachment objects ready to be sent. Triggered by system pickers, camera, and file browser results.

Link copied to clipboard

Called when the user selects a slash command from the command picker.

Link copied to clipboard

Called when the user submits a new poll configuration from the creation screen.

Link copied to clipboard

Called when the user taps the "Create Poll" button, opening the poll creation dialog.

Link copied to clipboard

Called when the poll creation dialog is closed without submitting (e.g. back press or discard).

Link copied to clipboard
val onDismiss: () -> Unit

Called when the attachment picker should be dismissed (back press, outside tap, etc.).