mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
properly retrieve cached portrait photos
This commit is contained in:
parent
de40d67940
commit
bac9bf57b1
1 changed files with 9 additions and 0 deletions
|
@ -619,6 +619,15 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||
media.addAll(getUpdatedDeletedMedia(mediumDao))
|
||||
}
|
||||
|
||||
if (config.filterMedia and TYPE_PORTRAITS != 0) {
|
||||
for (folder in foldersToScan) {
|
||||
val allFiles = File(folder).listFiles() ?: continue
|
||||
allFiles.filter { it.isDirectory && it.name.startsWith("img_", true) }.forEach {
|
||||
foldersToScan.add(it.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val shouldShowHidden = config.shouldShowHidden
|
||||
foldersToScan.filter { path.isNotEmpty() || !config.isFolderProtected(it) }.forEach {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue