GetStream / stream-chat-android

:speech_balloon: Android Chat SDK ➜ Stream Chat API. UI component libraries for chat apps. Kotlin & Jetpack Compose messaging SDK for Android chat
https://getstream.io/chat/sdk/android/
Other
1.43k stars 268 forks source link

Provide a way to replace UserAvatar in messages with a custom composable #4675

Open ChrisTitos opened 1 year ago

ChrisTitos commented 1 year ago

We are using the Compose SDK which is mostly great. One thing we ran into though is that we want to replace the default UserAvatar with our own design.

For the avatar next to a message bubble, we were able to simply replace the messageItemContent of the MessageContainer and that gave us enough flexibility to keep SDK-provided components but replace what we needed (we needed to change the layout of the bubble anyway). But for quoted messages we are not able to easily replace the avatar, as that composable is a lot of levels deep, and would require copying all other composables just to change that one thing. (I think this would also be the case if we would have kept the default message footer which has the avatar).

So a way to easily replace the avatar with a custom composable would be very useful.

MarinTolic commented 1 year ago

Hi @ChrisTitos ,

Thank you for the suggestion.

We'll look into this issue, see if there's a way to provide easy customization and get back to you once we make a decision on the way to go forward. :smile: