mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
fix #765, avoid showing hidden items when inappropriate at Show All Folders
This commit is contained in:
parent
ca02223ab6
commit
1b474d66f3
1 changed files with 4 additions and 1 deletions
|
@ -289,7 +289,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||||
val shouldShowHidden = config.shouldShowHidden
|
val shouldShowHidden = config.shouldShowHidden
|
||||||
var filteredMedia = media
|
var filteredMedia = media
|
||||||
if (!shouldShowHidden) {
|
if (!shouldShowHidden) {
|
||||||
filteredMedia = media.filter { !it.name.startsWith('.') } as ArrayList<Medium>
|
filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium>
|
||||||
}
|
}
|
||||||
|
|
||||||
val filterMedia = config.filterMedia
|
val filterMedia = config.filterMedia
|
||||||
|
@ -303,6 +303,9 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||||
}
|
}
|
||||||
}) as ArrayList<Medium>
|
}) as ArrayList<Medium>
|
||||||
|
|
||||||
|
Medium.sorting = config.getFileSorting(path)
|
||||||
|
filteredMedia.sort()
|
||||||
|
|
||||||
callback(filteredMedia)
|
callback(filteredMedia)
|
||||||
media.filter { !getDoesFilePathExist(it.path) }.forEach {
|
media.filter { !getDoesFilePathExist(it.path) }.forEach {
|
||||||
mediumDao.deleteMediumPath(it.path)
|
mediumDao.deleteMediumPath(it.path)
|
||||||
|
|
Loading…
Reference in a new issue