From 1a04a98040d189b48e127c27ef54fcb0f779dac8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 21 Jun 2018 21:39:15 +0200 Subject: [PATCH] fix fetching cached files at Show All Folders Content --- .../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 49743ba99..c4049327e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -318,7 +318,7 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly: fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImagesOnly: Boolean = false, callback: (ArrayList) -> Unit) { Thread { val mediumDao = galleryDB.MediumDao() - val foldersToScan = if (path == "/") MediaFetcher(this).getFoldersToScan() else arrayListOf(path) + val foldersToScan = if (path.isEmpty()) MediaFetcher(this).getFoldersToScan() else arrayListOf(path) var media = ArrayList() if (path == FAVORITES) { media.addAll(mediumDao.getFavorites())