Skip to content

Commit c2fd3f8

Browse files
committed
don't use list for file attachment
1 parent 12bbebf commit c2fd3f8

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

packages/stream_chat_flutter/lib/src/message_input/stream_message_input_attachment_list.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,11 @@ class MessageInputMediaAttachments extends StatelessWidget {
364364

365365
return SizedBox(
366366
width: 268,
367-
child: MessageInputFileAttachments(
368-
attachments: [attachment],
369-
attachmentBuilder: fileAttachmentBuilder,
370-
onRemovePressed: onRemovePressed,
367+
child: MessageComposerAttachmentFile(
368+
fileTypeIcon: StreamFileTypeIcon.fromMimeType(mimeType: attachment.file?.mediaType?.mimeType ?? ''),
369+
title: attachment.title ?? context.translations.fileText,
370+
subtitle: _FileAttachmentSubtitle(attachment: attachment),
371+
onRemovePressed: onRemovePressed != null ? () => onRemovePressed!(attachment) : null,
371372
),
372373
);
373374
}

0 commit comments

Comments
 (0)