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