diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt index 30424e724..bf43fe15f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt @@ -72,8 +72,8 @@ class PickDirectoryDialog( fetchDirectories(false) } - private fun fetchDirectories(forceShowHidden: Boolean) { - activity.getCachedDirectories(forceShowHidden = forceShowHidden) { + private fun fetchDirectories(forceShowHiddenAndExcluded: Boolean) { + activity.getCachedDirectories(forceShowHidden = forceShowHiddenAndExcluded, forceShowExcluded = forceShowHiddenAndExcluded) { if (it.isNotEmpty()) { it.forEach { it.subfoldersMediaCount = it.mediaCnt diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index a6cd47ceb..fe01f1229 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -636,6 +636,7 @@ fun Context.getCachedDirectories( getVideosOnly: Boolean = false, getImagesOnly: Boolean = false, forceShowHidden: Boolean = false, + forceShowExcluded: Boolean = false, callback: (ArrayList) -> Unit ) { ensureBackgroundThread { @@ -655,7 +656,7 @@ fun Context.getCachedDirectories( } val shouldShowHidden = config.shouldShowHidden || forceShowHidden - val excludedPaths = if (config.temporarilyShowExcluded) { + val excludedPaths = if (config.temporarilyShowExcluded || forceShowExcluded) { HashSet() } else { config.excludedFolders