mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
show .nomedia folders if Show hidden folders is checked
This commit is contained in:
parent
ccf71496e2
commit
df5981f74c
1 changed files with 12 additions and 9 deletions
|
@ -143,16 +143,19 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun removeNoMediaFolders(dirs: MutableList<Directory>) {
|
private fun removeNoMediaFolders(dirs: MutableList<Directory>) {
|
||||||
val ignoreDirs = ArrayList<Directory>()
|
val showHiddenFolders = mConfig.showHiddenFolders
|
||||||
for (d in dirs) {
|
if (!showHiddenFolders) {
|
||||||
val dir = File(d.path)
|
val ignoreDirs = ArrayList<Directory>()
|
||||||
if (dir.exists() && dir.isDirectory) {
|
for (d in dirs) {
|
||||||
val res = dir.list { file, filename -> filename == ".nomedia" }
|
val dir = File(d.path)
|
||||||
if (res?.isNotEmpty() == true)
|
if (dir.exists() && dir.isDirectory) {
|
||||||
ignoreDirs.add(d)
|
val res = dir.list { file, filename -> filename == ".nomedia" }
|
||||||
|
if (res?.isNotEmpty() == true)
|
||||||
|
ignoreDirs.add(d)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
dirs.removeAll(ignoreDirs)
|
dirs.removeAll(ignoreDirs)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue