add an activity check at SelectContacts adapter

This commit is contained in:
tibbi 2018-05-09 15:08:07 +02:00
parent 2a6af180eb
commit ba76c18bbe

View file

@ -119,7 +119,9 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List<Con
.error(contactDrawable)
.centerCrop()
Glide.with(activity).load(contact.photoUri).transition(DrawableTransitionOptions.withCrossFade()).apply(options).into(contact_tmb)
if (activity.isActivityDestroyed()) {
Glide.with(activity).load(contact.photoUri).transition(DrawableTransitionOptions.withCrossFade()).apply(options).into(contact_tmb)
}
} else {
contact_tmb.setImageDrawable(contactDrawable)
}