From bc455addb4c595cb31caf01455ab97813b23d611 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 29 Sep 2019 22:46:24 +0200 Subject: [PATCH] do not show portrait folders on the main screen --- .../simplemobiletools/gallery/pro/extensions/String.kt | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ac921defd..0d708ce1a 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 @@ -16,6 +16,15 @@ fun String.shouldFolderBeVisible(excludedPaths: MutableSet, includedPath } val file = File(this) + if (file.name.startsWith("img_", true)) { + val files = file.list() + if (files != null) { + if (files.any { it.contains("portrait", true) && it.contains("burst", true) }) { + return false + } + } + } + if (!showHidden && file.isHidden) { return false } else if (includedPaths.contains(this)) {