mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
removing a redundant function
This commit is contained in:
@@ -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<Medium> {
|
||||
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<Medium> {
|
||||
val media = ArrayList<Medium>()
|
||||
val files = File(folder).listFiles() ?: return media
|
||||
|
Reference in New Issue
Block a user