From b6ce7593707ddd8bb28528c9e49c91a9be2c4b85 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 23 Jan 2019 12:42:48 +0100 Subject: [PATCH] fix #1230, show directly included folders even if they contain .nomedia --- .../com/simplemobiletools/gallery/pro/extensions/String.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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