diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt index 9553fed46..1877868b1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/context.kt @@ -88,10 +88,11 @@ fun Context.getParents(): ArrayList { } private fun isFolderVisible(path: String, noMediaFolders: ArrayList): Boolean { - val parts = path.split("/") - return if (parts.any { it.startsWith(".") }) { + return if (path.contains("/.")) { false - } else !noMediaFolders.any { path.startsWith(it) } + } else { + !noMediaFolders.any { path.startsWith(it) } + } } fun Context.getNoMediaFolders(): ArrayList {