Merge pull request #6103 from vector-im/feature/ons/fix_live_location_flickering

Glide - Use current drawable while loading new static map image
This commit is contained in:
Onuray Sahin 2022-05-20 18:36:12 +03:00 committed by GitHub
commit 109b381e2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
changelog.d/6103.bugfix Normal file
View file

@ -0,0 +1 @@
Glide - Use current drawable while loading new static map image

View file

@ -75,6 +75,7 @@ abstract class AbsMessageLocationItem<H : AbsMessageLocationItem.Holder> : AbsMe
GlideApp.with(holder.staticMapImageView) GlideApp.with(holder.staticMapImageView)
.load(location) .load(location)
.apply(RequestOptions.centerCropTransform()) .apply(RequestOptions.centerCropTransform())
.placeholder(holder.staticMapImageView.drawable)
.listener(object : RequestListener<Drawable> { .listener(object : RequestListener<Drawable> {
override fun onLoadFailed(e: GlideException?, override fun onLoadFailed(e: GlideException?,
model: Any?, model: Any?,