-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix: Single image shown multiple times #5966
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thanks for fixing it!
Is it opening AttachmentView correctly?
@diegolmello AttachmentView is showing correct image |
@Rohit3523 Ok. @OtavioStasiak is going to review this and we can plan it for 4.55.0 later this month. |
This pull request also fixes an issue where, if we attempt to send the same images multiple times in the same channel, one of them fails to open in preview mode. Explanation: If I send images 1 and 2 together in a single message from the API and then send the same images again, only the latest images are clickable and viewable in preview mode on the chat screen. The previous images do not open in preview mode. |
I have made the changes to display image from cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works fine on both platforms, nice job!
Tested on:
iPhone 15 (IOS 17.5)
android Pixel 8 (API 35)
Thanks ^_^ |
…e image send multiple times)
9dd961d
to
fe93aea
Compare
The rest of the work is going to be finished on #6068 |
@Rohit3523 Send me your github email so I can add you as co-author there. |
Proposed changes
This pull request fixes the issue where if we attach multiple image URLs in a single message payload, the App only showed the last image multiple times. The root cause was in attachment caching logic. While mapping through the attachments array, we were incorrectly updating all attachment URLs to the same value. To fix this, I modified the code to compare the download URL with each attachment's image URL during the mapping process:
Issue(s)
#5942
How to test or reproduce
To test this issue please use the following api
Types of changes
Checklist