mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
removing a redundant function
This commit is contained in:
parent
ff13f59d47
commit
519df9e8a1
1 changed files with 1 additions and 9 deletions
|
@ -29,7 +29,7 @@ class MediaFetcher(val context: Context) {
|
||||||
val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia)
|
val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia)
|
||||||
curMedia.addAll(newMedia)
|
curMedia.addAll(newMedia)
|
||||||
} else {
|
} else {
|
||||||
val newMedia = fetchFolderContent(curPath, isPickImage, isPickVideo, filterMedia)
|
val newMedia = getMediaInFolder(curPath, isPickImage, isPickVideo, filterMedia)
|
||||||
curMedia.addAll(newMedia)
|
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> {
|
private fun getMediaInFolder(folder: String, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int): ArrayList<Medium> {
|
||||||
val media = ArrayList<Medium>()
|
val media = ArrayList<Medium>()
|
||||||
val files = File(folder).listFiles() ?: return media
|
val files = File(folder).listFiles() ?: return media
|
||||||
|
|
Loading…
Reference in a new issue