mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
fix #774, avoid showing Excluded images at Show All Folders Content
This commit is contained in:
parent
49e376e2ec
commit
41ab8d4d6b
2 changed files with 11 additions and 1 deletions
|
@ -292,6 +292,16 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||||
filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium>
|
filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (path == "/") {
|
||||||
|
val excludedFolders = config.excludedFolders
|
||||||
|
filteredMedia = filteredMedia.filter {
|
||||||
|
val mediumPath = it.path
|
||||||
|
excludedFolders.none {
|
||||||
|
mediumPath.startsWith(it, true)
|
||||||
|
}
|
||||||
|
} as ArrayList<Medium>
|
||||||
|
}
|
||||||
|
|
||||||
val filterMedia = config.filterMedia
|
val filterMedia = config.filterMedia
|
||||||
filteredMedia = (when {
|
filteredMedia = (when {
|
||||||
getVideosOnly -> filteredMedia.filter { it.type == TYPE_VIDEOS }
|
getVideosOnly -> filteredMedia.filter { it.type == TYPE_VIDEOS }
|
||||||
|
|
|
@ -24,7 +24,7 @@ data class Directory(
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val serialVersionUID = -6553345863555455L
|
private const val serialVersionUID = -6553345863555455L
|
||||||
var sorting: Int = 0
|
var sorting = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun compareTo(other: Directory): Int {
|
override fun compareTo(other: Directory): Int {
|
||||||
|
|
Loading…
Reference in a new issue