Fix crash in AvatarImageView.
This commit is contained in:
parent
75b232bfdc
commit
5948b46ac7
1 changed files with 6 additions and 7 deletions
|
@ -105,13 +105,12 @@ public class AvatarImageView extends AppCompatImageView {
|
||||||
Drawable fallbackContactPhotoDrawable = photo.recipient.getFallbackContactPhotoDrawable(getContext(), inverted);
|
Drawable fallbackContactPhotoDrawable = photo.recipient.getFallbackContactPhotoDrawable(getContext(), inverted);
|
||||||
|
|
||||||
if (photo.contactPhoto != null) {
|
if (photo.contactPhoto != null) {
|
||||||
GlideApp.with(this)
|
requestManager.load(photo.contactPhoto)
|
||||||
.load(photo.contactPhoto)
|
.fallback(fallbackContactPhotoDrawable)
|
||||||
.fallback(fallbackContactPhotoDrawable)
|
.error(fallbackContactPhotoDrawable)
|
||||||
.error(fallbackContactPhotoDrawable)
|
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
.circleCrop()
|
||||||
.circleCrop()
|
.into(this);
|
||||||
.into(this);
|
|
||||||
} else {
|
} else {
|
||||||
setImageDrawable(fallbackContactPhotoDrawable);
|
setImageDrawable(fallbackContactPhotoDrawable);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue