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
1 changed files with 3 additions and 1 deletions

View File

@ -119,7 +119,9 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List<Con
.error(contactDrawable) .error(contactDrawable)
.centerCrop() .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 { } else {
contact_tmb.setImageDrawable(contactDrawable) contact_tmb.setImageDrawable(contactDrawable)
} }