shortening a function
This commit is contained in:
parent
6a80ab4473
commit
639c3d57c6
1 changed files with 1 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue