mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
improve file signature by getting its name too
This commit is contained in:
parent
ce3ce0bec0
commit
51f0d87638
1 changed files with 4 additions and 1 deletions
|
@ -3,7 +3,10 @@ package com.simplemobiletools.gallery.extensions
|
|||
import com.bumptech.glide.signature.ObjectKey
|
||||
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) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue