From 639c3d57c66a38c153116b59576888a5dde0c427 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 17 Nov 2016 15:20:04 +0100 Subject: [PATCH] shortening a function --- .../gallery/asynctasks/GetDirectoriesAsynctask.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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) }