From 49ad4d812f3715d4b0b5ce837664bfb8e2b0cbe0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 29 Sep 2019 21:35:08 +0200 Subject: [PATCH] add only Portrait folders in subdirs at fetching media --- .../simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 72d5e07f6..57a354fb5 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 @@ -207,7 +207,7 @@ class MediaFetcher(val context: Context) { val checkFileExistence = config.fileLoadingPriority == PRIORITY_VALIDITY val showHidden = config.shouldShowHidden val dateTakens = if (getProperDateTaken && folder != FAVORITES && !isRecycleBin) getFolderDateTakens(folder) else HashMap() - val subdirs = ArrayList() + val subdirs = ArrayList() // used only for Portrait photos starting with "IMG_" for now val files = when (folder) { FAVORITES -> favoritePaths.filter { showHidden || !it.contains("/.") }.map { File(it) }.toMutableList() as ArrayList @@ -217,7 +217,9 @@ class MediaFetcher(val context: Context) { val notDirs = ArrayList() allFiles.forEach { if (it.isDirectory) { - subdirs.add(it) + if (it.name.startsWith("img_", true)) { + subdirs.add(it) + } } else { notDirs.add(it) }