-
Notifications
You must be signed in to change notification settings - Fork 731
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
Glide - Use current drawable while loading new static map image (PSF-979) #6103
Conversation
@@ -75,6 +75,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe | |||
GlideApp.with(holder.staticMapImageView) | |||
.load(location) | |||
.apply(RequestOptions.centerCropTransform()) | |||
.placeholder(holder.staticMapImageView.drawable) |
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 fix seems to come from this suggestion: bumptech/glide#2505 (comment)
It's not recommended to use that in RecyclerView, which is the case here (see the comments below).
I should work, but may lead to some issue.
Not a blocker anyway.
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 fix seems to come from this suggestion: bumptech/glide#2505 (comment)
Exactly, I couldn't find any other solutions. I could understand the below comment if we were setting the actual source but we are just setting the placeholder.
- We are going to have a test session next week.
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.
I'm agree with @bmarty about this fix. Further tests are needed.
Matrix SDKIntegration Tests Results:
|
Interestingly, Glide is clearing current image before the new image is loaded which causes a flicker on timeline item. This PR suggests to use current drawable as placeolder while loading the new static map image.