diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt index 4f65de3ff..86b8e963f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -111,12 +111,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va private fun removeHiddenFolders(dirs: MutableList) { val hiddenDirs = mConfig.hiddenFolders - val ignoreDirs = ArrayList() - for (dir in dirs) { - if (hiddenDirs.contains(dir.path)) - ignoreDirs.add(dir) - } - + val ignoreDirs = dirs.filter { hiddenDirs.contains(it.path) } dirs.removeAll(ignoreDirs) }