remove the string signatures from recyclerviews
This commit is contained in:
parent
70afd83bd7
commit
ebd14626cb
|
@ -11,7 +11,6 @@ import com.bignerdranch.android.multiselector.SwappingHolder
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.DecodeFormat
|
import com.bumptech.glide.load.DecodeFormat
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.signature.StringSignature
|
|
||||||
import com.simplemobiletools.commons.asynctasks.CopyMoveTask
|
import com.simplemobiletools.commons.asynctasks.CopyMoveTask
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||||
|
@ -330,21 +329,20 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
||||||
toggleItemSelection(this, markedItems.contains(pos), pos)
|
toggleItemSelection(this, markedItems.contains(pos), pos)
|
||||||
|
|
||||||
val tmb = directory.thumbnail
|
val tmb = directory.thumbnail
|
||||||
val timestampSignature = StringSignature(directory.date_modified.toString())
|
|
||||||
if (tmb.isGif()) {
|
if (tmb.isGif()) {
|
||||||
if (animateGifs) {
|
if (animateGifs) {
|
||||||
Glide.with(activity).load(tmb).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).signature(timestampSignature)
|
Glide.with(activity).load(tmb).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().crossFade().into(dir_thumbnail)
|
.centerCrop().crossFade().into(dir_thumbnail)
|
||||||
} else {
|
} else {
|
||||||
Glide.with(activity).load(tmb).asBitmap().diskCacheStrategy(DiskCacheStrategy.RESULT).signature(timestampSignature)
|
Glide.with(activity).load(tmb).asBitmap().diskCacheStrategy(DiskCacheStrategy.RESULT).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().into(dir_thumbnail)
|
.centerCrop().into(dir_thumbnail)
|
||||||
}
|
}
|
||||||
} else if (tmb.toLowerCase().endsWith(".png")) {
|
} else if (tmb.toLowerCase().endsWith(".png")) {
|
||||||
Glide.with(activity).load(tmb).asBitmap().format(DecodeFormat.PREFER_ARGB_8888).diskCacheStrategy(DiskCacheStrategy.RESULT)
|
Glide.with(activity).load(tmb).asBitmap().format(DecodeFormat.PREFER_ARGB_8888).diskCacheStrategy(DiskCacheStrategy.RESULT)
|
||||||
.signature(timestampSignature).placeholder(backgroundColor).centerCrop().into(dir_thumbnail)
|
.placeholder(backgroundColor).centerCrop().into(dir_thumbnail)
|
||||||
} else {
|
} else {
|
||||||
Glide.with(activity).load(tmb).diskCacheStrategy(DiskCacheStrategy.RESULT).signature(timestampSignature)
|
Glide.with(activity).load(tmb).diskCacheStrategy(DiskCacheStrategy.RESULT).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().crossFade().into(dir_thumbnail)
|
.centerCrop().crossFade().into(dir_thumbnail)
|
||||||
}
|
}
|
||||||
|
|
||||||
setOnClickListener { viewClicked(multiSelector, directory, pos) }
|
setOnClickListener { viewClicked(multiSelector, directory, pos) }
|
||||||
|
|
|
@ -11,7 +11,6 @@ import com.bignerdranch.android.multiselector.SwappingHolder
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.DecodeFormat
|
import com.bumptech.glide.load.DecodeFormat
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.signature.StringSignature
|
|
||||||
import com.simplemobiletools.commons.asynctasks.CopyMoveTask
|
import com.simplemobiletools.commons.asynctasks.CopyMoveTask
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
import com.simplemobiletools.commons.dialogs.PropertiesDialog
|
||||||
|
@ -248,21 +247,20 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
toggleItemSelection(this, markedItems.contains(pos), pos)
|
toggleItemSelection(this, markedItems.contains(pos), pos)
|
||||||
|
|
||||||
val path = medium.path
|
val path = medium.path
|
||||||
val timestampSignature = StringSignature(medium.date_modified.toString())
|
|
||||||
if (medium.isGif()) {
|
if (medium.isGif()) {
|
||||||
if (animateGifs) {
|
if (animateGifs) {
|
||||||
Glide.with(activity).load(path).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).signature(timestampSignature)
|
Glide.with(activity).load(path).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().crossFade().into(medium_thumbnail)
|
.centerCrop().crossFade().into(medium_thumbnail)
|
||||||
} else {
|
} else {
|
||||||
Glide.with(activity).load(path).asBitmap().diskCacheStrategy(DiskCacheStrategy.NONE).signature(timestampSignature)
|
Glide.with(activity).load(path).asBitmap().diskCacheStrategy(DiskCacheStrategy.NONE).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().into(medium_thumbnail)
|
.centerCrop().into(medium_thumbnail)
|
||||||
}
|
}
|
||||||
} else if (medium.isPng()) {
|
} else if (medium.isPng()) {
|
||||||
Glide.with(activity).load(path).asBitmap().format(DecodeFormat.PREFER_ARGB_8888).diskCacheStrategy(DiskCacheStrategy.RESULT)
|
Glide.with(activity).load(path).asBitmap().format(DecodeFormat.PREFER_ARGB_8888).diskCacheStrategy(DiskCacheStrategy.RESULT)
|
||||||
.signature(timestampSignature).placeholder(backgroundColor).centerCrop().into(medium_thumbnail)
|
.placeholder(backgroundColor).centerCrop().into(medium_thumbnail)
|
||||||
} else {
|
} else {
|
||||||
Glide.with(activity).load(path).diskCacheStrategy(DiskCacheStrategy.RESULT).signature(timestampSignature)
|
Glide.with(activity).load(path).diskCacheStrategy(DiskCacheStrategy.RESULT).placeholder(backgroundColor)
|
||||||
.placeholder(backgroundColor).centerCrop().crossFade().into(medium_thumbnail)
|
.centerCrop().crossFade().into(medium_thumbnail)
|
||||||
}
|
}
|
||||||
|
|
||||||
setOnClickListener { viewClicked(multiSelector, medium, pos) }
|
setOnClickListener { viewClicked(multiSelector, medium, pos) }
|
||||||
|
|
Loading…
Reference in New Issue