Skip to content
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

ChatChannelView don't update live images of channel users #649

Closed
jmagnier-luna opened this issue Nov 9, 2024 · 1 comment
Closed

ChatChannelView don't update live images of channel users #649

jmagnier-luna opened this issue Nov 9, 2024 · 1 comment

Comments

@jmagnier-luna
Copy link

What did you do?

If I modify a ChatUser's photo for User A from a device, the ChatChannelController on an other device connected to User B inside a chat with User A will emit a change.

What did you expect to happen?

Live update for imageUrl inside ChatChannelView

What happened instead?

However, MessageContainerView (the default implementation of the ViewFactory) will cache the ChatUser's url in MessageCachingUtils, so the view's body will be recalled, but MessageAvatarView will be provided with the cached url.

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
Swift version:
Xcode version:
Device:

Additional context

@nuno-vieira
Copy link
Member

Hi @jmagnier-luna,

This is done on prupose at the moment for performance reasons. Updating the image of a user will trigger a message update for almost every message, which in SwiftUI will cause a performance penalty.

Since updating the image is not a common action, the compromise of not live updating is okay for now. When you open the channel again, it will update.

For now, we do not have plans to change this, but we will re-open the issue if we decide to change this in the future.

Thank you,
Nuno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants