compose: add workaround for glide sometimes not loading contact pictures
This commit is contained in:
parent
284a13070a
commit
67541a60cb
1 changed files with 5 additions and 3 deletions
|
@ -126,11 +126,13 @@ public class RecipientAdapter extends BaseAdapter implements Filterable {
|
|||
}
|
||||
|
||||
public static void setContactPhotoOrPlaceholder(Context context, ImageView imageView, Recipient recipient) {
|
||||
imageView.setImageDrawable(null);
|
||||
|
||||
// TODO don't use two different mechanisms for loading!
|
||||
if (recipient.photoThumbnailUri != null) {
|
||||
Glide.with(context).load(recipient.photoThumbnailUri).into(imageView);
|
||||
Glide.with(context).load(recipient.photoThumbnailUri)
|
||||
// for some reason, this fixes loading issues.
|
||||
.placeholder(null)
|
||||
.dontAnimate()
|
||||
.into(imageView);
|
||||
} else {
|
||||
ContactPicture.getContactPictureLoader(context).loadContactPicture(recipient.address, imageView);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue