-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Compose GlideImage does not repaint Image when model changed #4916
Labels
Comments
It has to be something wrong with using "remember" inside a GlideImage |
Yeah in particular, the model is supposed to be part of RequestBuilder, but it's not included in RequestBuilder's equals/hashcode method. In fact a few things in RequestBuilder are not included and it's kind of unsafe by default because RequestBuilder inherits from a class that does implement equals/hashcode. |
sjudd
added a commit
that referenced
this issue
Oct 7, 2022
…ncrete classes. It's a little tricky to get this right because we've defined equals/hashcode in the base classes, but are implementing them in the concrete classes. I think this implementation is actually safe because the base classes are abstract. However making equals transitive requires the weird equals() only implementations in the classes that have no properties but are concrete implementations of the base classes. A safer way to do this would be to move the the equals/hashcode implementation out of the base class and re-implement it in each subclass. However that would require exposing a bunch of internal instance variables to subclasses. Given the existing structure and the public nature of the base classes, this seems like a reasonable compromise. Fixes #4916
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glide Version: Glide 4.14.1, glide:compose:1.0.0-alpha.0
Issue details / Repro steps / Use case background:
for image selection i use:
implementation 'com.github.akshaaatt:Cropper:1.00'
When i click button first time and select image - it appears correctly, but when i click button second time and select new image GlideImage does not redraw itself and i see old picture.
I checked with Logs - avatarUri updated correctly and Compose recomposed.
The text was updated successfully, but these errors were encountered: