simplify the hidden folder check
This commit is contained in:
parent
f372d46b51
commit
f82b09470b
1 changed files with 4 additions and 3 deletions
|
@ -88,10 +88,11 @@ fun Context.getParents(): ArrayList<String> {
|
|||
}
|
||||
|
||||
private fun isFolderVisible(path: String, noMediaFolders: ArrayList<String>): Boolean {
|
||||
val parts = path.split("/")
|
||||
return if (parts.any { it.startsWith(".") }) {
|
||||
return if (path.contains("/.")) {
|
||||
false
|
||||
} else !noMediaFolders.any { path.startsWith(it) }
|
||||
} else {
|
||||
!noMediaFolders.any { path.startsWith(it) }
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.getNoMediaFolders(): ArrayList<String> {
|
||||
|
|
Loading…
Reference in a new issue