-
public final class FileAttachmentContentKt
-
-
Method Summary
Modifier and Type Method Description final static UnitFileAttachmentContent(AttachmentState attachmentState, Modifier modifier, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onItemClick)Builds a file attachment message which shows a list of files. final static UnitFileAttachmentItem(Attachment attachment, Boolean isMine, Function1<Attachment, Boolean> showFileSize, Modifier modifier)Represents each file item in the list of file attachments. final static UnitFileAttachmentImage(Attachment attachment, Boolean isMine)Represents the image that's shown in file attachments. -
-
Method Detail
-
FileAttachmentContent
@Composable() final static Unit FileAttachmentContent(AttachmentState attachmentState, Modifier modifier, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onItemClick)
Builds a file attachment message which shows a list of files.
- Parameters:
attachmentState-The state of the attachment, holding the root modifier, the message and the onLongItemClick handler.
modifier- Modifier for styling.onItemClick- Lambda called when an item gets clicked.
-
FileAttachmentItem
@Composable() final static Unit FileAttachmentItem(Attachment attachment, Boolean isMine, Function1<Attachment, Boolean> showFileSize, Modifier modifier)
Represents each file item in the list of file attachments.
- Parameters:
attachment- The file attachment to show.isMine- Whether the message is sent by the current user or not.showFileSize- Whether to show the file size or not.modifier- Modifier for styling.
-
FileAttachmentImage
@Composable() final static Unit FileAttachmentImage(Attachment attachment, Boolean isMine)
Represents the image that's shown in file attachments. This can be either an image/icon that represents the file type or a thumbnail in case the file type is an image.
- Parameters:
attachment-The attachment we use to show the image.
-
-
-
-