shortening a function

This commit is contained in:
tibbi 2016-11-17 15:20:04 +01:00
parent 6a80ab4473
commit 639c3d57c6

View file

@ -111,12 +111,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
private fun removeHiddenFolders(dirs: MutableList<Directory>) {
val hiddenDirs = mConfig.hiddenFolders
val ignoreDirs = ArrayList<Directory>()
for (dir in dirs) {
if (hiddenDirs.contains(dir.path))
ignoreDirs.add(dir)
}
val ignoreDirs = dirs.filter { hiddenDirs.contains(it.path) }
dirs.removeAll(ignoreDirs)
}