-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initials Placeholder for ChatAvatarView #2087
Comments
Hello @martindaum , The "initials as channel avatar" behavior is outdated, our current Design Kit has "merged avatars" as default. You can see it in Swift SDK and React SDK (https://getstream.io/chat/demos/messaging/) If you want to implement this behavior yourself, you can do so as: class InitialsChannelAvatarView: ChatChannelAvatarView {
override func loadMergedAvatars(channel: ChatChannel) {
// .. get initials from the member
// assign the avatar
loadIntoAvatarImageView(from: nil, placeholder: yourNewInitialsImage)
}
} and inject your new class via Do you need more help regarding this? |
I would want it in the MessageView, not for the Channel Avatar! |
Ah, thanks for clarifying, I misunderstood. Indeed it's a missing feature from Swift SDK. We're internally tracking this as CIS-1978. Meanwhile, you can apply the same logic from my message above, customize |
Okay thanks! I will implement it that way! |
I am not able to set the authorAvatarView because the setter is private. In the samples I have seen you can assign a custom ChatAvatarView to components, but then I am not able to retrieve the name. I am missing something? |
You wouldn't assign |
Hi @martindaum, Im just following up in here. Did your issue got resolved? Or are you still encountering some issues? Best, |
Not an ideal solution, because I have to render an image instead of designing a custom view. But as a workaround it would work. It would help if we could inject a custom view for the avatar view (which also has access to content) instead of having to use an image. |
Hey @martindaum, thanks for the feedback! Ill create an issue internally for us to review this part of our SDK. Best, |
What are you trying to achieve?
If there is no image set for an Avatar, I would like to show a placeholder with the initials of the user instead of an avatar placeholder.
If possible, how can you achieve this currently?
I guess I could create a custom view for it and use a custom MessageContentView to inject it
What would be the better way?
The Android SDK falls back to the initials view, so it would be great if the iOS SDK also has the same behaviour.
GetStream Environment
GetStream Chat version: 4.16.0
GetStream Chat frameworks: StreamChat, StreamChatUI
iOS version:
Swift version:
Xcode version:
Device:
Additional context
The text was updated successfully, but these errors were encountered: