show .nomedia folders if Show hidden folders is checked

This commit is contained in:
tibbi 2017-01-06 16:59:29 +01:00
parent ccf71496e2
commit df5981f74c

View file

@ -143,6 +143,8 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
} }
private fun removeNoMediaFolders(dirs: MutableList<Directory>) { private fun removeNoMediaFolders(dirs: MutableList<Directory>) {
val showHiddenFolders = mConfig.showHiddenFolders
if (!showHiddenFolders) {
val ignoreDirs = ArrayList<Directory>() val ignoreDirs = ArrayList<Directory>()
for (d in dirs) { for (d in dirs) {
val dir = File(d.path) val dir = File(d.path)
@ -156,3 +158,4 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
dirs.removeAll(ignoreDirs) dirs.removeAll(ignoreDirs)
} }
} }
}