From 688b0e26242031343bebea6a807b85989e8251d2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 25 Apr 2018 23:59:17 +0200 Subject: [PATCH] add an extra check to avoid showing duplicate folders --- .../kotlin/com/simplemobiletools/gallery/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f2b48b5bd..0f4673fa5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -276,7 +276,7 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly: } }) as ArrayList - callback(filteredDirectories) + callback(filteredDirectories.distinctBy { it.path.toLowerCase() } as ArrayList) removeInvalidDBDirectories(directories, directoryDao) }.start()