mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
add some activity checks at clearing Glide load
This commit is contained in:
parent
693e93aa6c
commit
2acbc1a02e
2 changed files with 4 additions and 2 deletions
|
@ -455,7 +455,8 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
fun stopLoad() {
|
||||
Glide.with(activity).clear(view.dir_thumbnail)
|
||||
if (!activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.dir_thumbnail)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -370,7 +370,8 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
|
||||
fun stopLoad() {
|
||||
Glide.with(activity).clear(view.medium_thumbnail)
|
||||
if (!activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.medium_thumbnail)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue