mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-30 19:56:44 +01:00
fix a glitch at including/excluding folders
This commit is contained in:
parent
8dfba43ef0
commit
c25ce6eafe
1 changed files with 2 additions and 2 deletions
|
@ -7,9 +7,9 @@ import com.simplemobiletools.commons.helpers.NOMEDIA
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.IOException
|
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 {
|
fun String.shouldFolderBeVisible(excludedPaths: MutableSet<String>, includedPaths: MutableSet<String>, showHidden: Boolean): Boolean {
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue