mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-03-03 19:18:46 +01:00
fix a glitch at including/excluding folders
This commit is contained in:
parent
8dfba43ef0
commit
c25ce6eafe
@ -7,9 +7,9 @@ import com.simplemobiletools.commons.helpers.NOMEDIA
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { startsWith(it, true) }
|
||||
fun String.isThisOrParentIncluded(includedPaths: MutableSet<String>) = includedPaths.any { equals(it, true) } || includedPaths.any { "$this/".startsWith("$it/", true) }
|
||||
|
||||
fun String.isThisOrParentExcluded(excludedPaths: MutableSet<String>) = excludedPaths.any { startsWith(it, true) }
|
||||
fun String.isThisOrParentExcluded(excludedPaths: MutableSet<String>) = excludedPaths.any { equals(it, true) } || excludedPaths.any { "$this/".startsWith("$it/", true) }
|
||||
|
||||
fun String.shouldFolderBeVisible(excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>, showHidden: Boolean): Boolean {
|
||||
if (isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user