fix #765, avoid showing hidden items when inappropriate at Show All Folders
This commit is contained in:
parent
ca02223ab6
commit
1b474d66f3
|
@ -289,7 +289,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||
val shouldShowHidden = config.shouldShowHidden
|
||||
var filteredMedia = media
|
||||
if (!shouldShowHidden) {
|
||||
filteredMedia = media.filter { !it.name.startsWith('.') } as ArrayList<Medium>
|
||||
filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium>
|
||||
}
|
||||
|
||||
val filterMedia = config.filterMedia
|
||||
|
@ -303,6 +303,9 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||
}
|
||||
}) as ArrayList<Medium>
|
||||
|
||||
Medium.sorting = config.getFileSorting(path)
|
||||
filteredMedia.sort()
|
||||
|
||||
callback(filteredMedia)
|
||||
media.filter { !getDoesFilePathExist(it.path) }.forEach {
|
||||
mediumDao.deleteMediumPath(it.path)
|
||||
|
|
Loading…
Reference in New Issue