diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/String.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/String.kt index 3941ba0db..b426c5a61 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/String.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/String.kt @@ -21,9 +21,13 @@ fun String.shouldFolderBeVisible(excludedPaths: MutableSet, includedPath val file = File(this) return if (isEmpty()) { false + } else if (!showHidden && file.isHidden) { + false + } else if (includedPaths.contains(this)) { + true } else if (!showHidden && file.containsNoMedia()) { false - } else if (excludedPaths.contains(this) && !includedPaths.contains(this)) { + } else if (excludedPaths.contains(this)) { false } else if (isThisOrParentIncluded(includedPaths)) { true