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>) {
val showHiddenFolders = mConfig.showHiddenFolders
if (!showHiddenFolders) {
val ignoreDirs = ArrayList<Directory>()
for (d in dirs) {
val dir = File(d.path)
@ -155,4 +157,5 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
dirs.removeAll(ignoreDirs)
}
}
}