AttachmentState

data class AttachmentState(val message: Message, val isMine: Boolean = false, val onLongItemClick: (Message) -> Unit = {}, val onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, val announceSender: Boolean = false)

Represents the state of Attachment items, used to render and add handlers required for the attachment to work.

Parameters

message

Data that represents the message information.

isMine

Flag that indicates if the message is from the current user.

onLongItemClick

Handler for a long click on the message item.

onMediaGalleryPreviewResult

Handler used when the user selects an action to perform from io.getstream.chat.android.compose.ui.attachments.preview.MediaGalleryPreviewActivity.

announceSender

Whether this attachment should prefix its accessibility label with the sender. Set for the first attachment of a message that has no text, so screen readers attribute attachment-only messages without announcing the sender more than once.

Constructors

Link copied to clipboard
constructor(message: Message, isMine: Boolean = false, onLongItemClick: (Message) -> Unit = {}, onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, announceSender: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard