mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
make sure hidden folders have "(hidden)" appended
This commit is contained in:
@ -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>)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user