mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
improve file signature by getting its name too
This commit is contained in:
@@ -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) }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user