pass Glide the activity instead of context
This commit is contained in:
parent
ca944c37a4
commit
ff9b61f95e
|
@ -217,10 +217,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
val tmb = directory.thumbnail
|
val tmb = directory.thumbnail
|
||||||
val timestampSignature = StringSignature(directory.timestamp.toString())
|
val timestampSignature = StringSignature(directory.timestamp.toString())
|
||||||
if (tmb.endsWith(".gif")) {
|
if (tmb.endsWith(".gif")) {
|
||||||
Glide.with(activity.applicationContext).load(tmb).asGif().diskCacheStrategy(DiskCacheStrategy.NONE).signature(timestampSignature)
|
Glide.with(activity).load(tmb).asGif().diskCacheStrategy(DiskCacheStrategy.NONE).signature(timestampSignature)
|
||||||
.placeholder(R.color.tmb_background).centerCrop().crossFade().into(itemView.dir_thumbnail)
|
.placeholder(R.color.tmb_background).centerCrop().crossFade().into(itemView.dir_thumbnail)
|
||||||
} else {
|
} else {
|
||||||
Glide.with(activity.applicationContext).load(tmb).diskCacheStrategy(DiskCacheStrategy.RESULT).signature(timestampSignature)
|
Glide.with(activity).load(tmb).diskCacheStrategy(DiskCacheStrategy.RESULT).signature(timestampSignature)
|
||||||
.placeholder(R.color.tmb_background).centerCrop().crossFade().into(itemView.dir_thumbnail)
|
.placeholder(R.color.tmb_background).centerCrop().crossFade().into(itemView.dir_thumbnail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue