improve file signature by getting its name too
This commit is contained in:
parent
ce3ce0bec0
commit
51f0d87638
|
@ -3,7 +3,10 @@ package com.simplemobiletools.gallery.extensions
|
||||||
import com.bumptech.glide.signature.ObjectKey
|
import com.bumptech.glide.signature.ObjectKey
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
fun String.getFileSignature() = ObjectKey(File(this).lastModified().toString())
|
fun String.getFileSignature(): ObjectKey {
|
||||||
|
val file = File(this)
|
||||||
|
return ObjectKey("${file.name}${file.lastModified()}")
|
||||||
|
}
|
||||||
|
|
||||||
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { startsWith(it, true) }
|
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { startsWith(it, true) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue