stream-chat-android icon indicating copy to clipboard operation
stream-chat-android copied to clipboard

Different Attachment Types within one Message cause invalid rendering (Compose UI)

Open jnischler opened this issue 1 year ago • 4 comments

Describe the bug Having multible different attachments within one message are displayed invalid. The first matched attachment factory needs to render all attachments also not matched attachments.

SDK version

  • 6.2.3

To Reproduce Steps to reproduce the behavior:

  1. Register at least 2 different attachmentFactories
  2. add 2 different attachments to your message
  3. post the message
  4. See error

Expected behavior Only matched attachments should be rendered by the corresponding attachment factory.

Regards Julian

jnischler avatar Mar 28 '24 23:03 jnischler

https://github.com/GetStream/stream-chat-android/blob/105ba6ed9e31023e732e2ce199706670881fd300/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/MessageAttachmentsContent.kt#L55

At this position you are only checking for the first possible handler so if there is a file in the attachments the file handler will kick in but the media handler cant handle. This should be changed to a per attachment basis oder you need to group the attachments by type this would make the most sense here.

jnischler avatar Mar 29 '24 12:03 jnischler

bump

jnischler avatar Jun 05 '24 19:06 jnischler

any news on this ? this should be fixed!

jnischler avatar Aug 15 '24 10:08 jnischler

Hi @jnischler,

Thank you very much for bringing this to our attention and for the detailed explanation. It seems that this might be more in line with a feature request rather than an issue.

We appreciate your valuable input and are always keen to improve the product based on user feedback.

kanat avatar Aug 29 '24 15:08 kanat