mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-18 13:00:36 +01:00
simplify the hidden folder check
This commit is contained in:
parent
f372d46b51
commit
f82b09470b
@ -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…
x
Reference in New Issue
Block a user