From 2764f205eea060bc8e7b8cf603a4ecfbe11da242 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 1 Dec 2018 11:05:46 +0100 Subject: [PATCH] filter folders for scanning from wrong folders --- .../com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 4dab1cf17..77c116a6a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -122,7 +122,7 @@ class MediaFetcher(val context: Context) { val foldersToIgnore = arrayListOf("/storage/emulated/legacy") val config = context.config val includedFolders = config.includedFolders - var foldersToScan = config.everShownFolders.toMutableList() as ArrayList + var foldersToScan = config.everShownFolders.filter { it == FAVORITES || it == RECYCLE_BIN || context.getDoesFilePathExist(it) }.toMutableList() as ArrayList cursor.use { if (cursor.moveToFirst()) {