mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
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>) {
|
private fun removeHiddenFolders(dirs: MutableList<Directory>) {
|
||||||
val hiddenDirs = mConfig.hiddenFolders
|
val hiddenDirs = mConfig.hiddenFolders
|
||||||
val ignoreDirs = ArrayList<Directory>()
|
val ignoreDirs = dirs.filter { hiddenDirs.contains(it.path) }
|
||||||
for (dir in dirs) {
|
|
||||||
if (hiddenDirs.contains(dir.path))
|
|
||||||
ignoreDirs.add(dir)
|
|
||||||
}
|
|
||||||
|
|
||||||
dirs.removeAll(ignoreDirs)
|
dirs.removeAll(ignoreDirs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue