From f1fe2028d58ed92ed0fa846cff20c9679fb691dd Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 8 Apr 2018 22:40:29 +0200 Subject: [PATCH] do not ever append explicitly included folders with "(hidden)" --- .../gallery/asynctasks/GetDirectoriesAsynctask.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 af0f5ff6d..df8673bba 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -30,6 +30,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va val hidden = context.resources.getString(R.string.hidden) val albumCovers = config.parseAlbumCovers() val hasOTG = context.hasOTGConnected() && context.config.OTGBasePath.isNotEmpty() + val includedFolders = config.includedFolders for ((path, curMedia) in groupedMedia) { Medium.sorting = config.getFileSorting(path) @@ -62,7 +63,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va } } - if (File(parentDir).doesParentHaveNoMedia()) { + if (File(parentDir).doesParentHaveNoMedia() && !includedFolders.contains(parentDir)) { dirName += " $hidden" }