From 519df9e8a1f5d2b0328c6a11b95806052b1678e8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 23 May 2018 23:30:00 +0200 Subject: [PATCH] removing a redundant function --- .../simplemobiletools/gallery/helpers/MediaFetcher.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt index 3b04c9598..a1a3ceb03 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/MediaFetcher.kt @@ -29,7 +29,7 @@ class MediaFetcher(val context: Context) { val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia) curMedia.addAll(newMedia) } else { - val newMedia = fetchFolderContent(curPath, isPickImage, isPickVideo, filterMedia) + val newMedia = getMediaInFolder(curPath, isPickImage, isPickVideo, filterMedia) curMedia.addAll(newMedia) } @@ -163,14 +163,6 @@ class MediaFetcher(val context: Context) { } } - private fun fetchFolderContent(path: String, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int): ArrayList { - return if (path.startsWith(OTG_PATH)) { - getMediaOnOTG(path, isPickImage, isPickVideo, filterMedia) - } else { - getMediaInFolder(path, isPickImage, isPickVideo, filterMedia) - } - } - private fun getMediaInFolder(folder: String, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int): ArrayList { val media = ArrayList() val files = File(folder).listFiles() ?: return media