mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
make sure hidden folders have "(hidden)" appended
This commit is contained in:
parent
70faf7e7cb
commit
527fda18f9
1 changed files with 9 additions and 0 deletions
|
@ -293,6 +293,15 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly:
|
||||||
}
|
}
|
||||||
}) as ArrayList<Directory>
|
}) as ArrayList<Directory>
|
||||||
|
|
||||||
|
val hiddenString = resources.getString(R.string.hidden)
|
||||||
|
filteredDirectories.forEach {
|
||||||
|
it.name = if (File(it.path).doesThisOrParentHaveNoMedia() && !it.path.isThisOrParentIncluded(includedPaths)) {
|
||||||
|
"${it.name.removeSuffix(hiddenString).trim()} $hiddenString"
|
||||||
|
} else {
|
||||||
|
it.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val clone = filteredDirectories.clone() as ArrayList<Directory>
|
val clone = filteredDirectories.clone() as ArrayList<Directory>
|
||||||
callback(clone.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory>)
|
callback(clone.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory>)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue