mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
fix fetching cached files at Show All Folders Content
This commit is contained in:
parent
637913415b
commit
1a04a98040
1 changed files with 1 additions and 1 deletions
|
@ -318,7 +318,7 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly:
|
||||||
fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImagesOnly: Boolean = false, callback: (ArrayList<Medium>) -> Unit) {
|
fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImagesOnly: Boolean = false, callback: (ArrayList<Medium>) -> Unit) {
|
||||||
Thread {
|
Thread {
|
||||||
val mediumDao = galleryDB.MediumDao()
|
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<Medium>()
|
var media = ArrayList<Medium>()
|
||||||
if (path == FAVORITES) {
|
if (path == FAVORITES) {
|
||||||
media.addAll(mediumDao.getFavorites())
|
media.addAll(mediumDao.getFavorites())
|
||||||
|
|
Loading…
Reference in a new issue