Changed show hidden button in folder picker to include excluded (#2693)

This commit is contained in:
Agnieszka C 2022-12-25 11:33:52 +01:00
parent 7d0e097ad5
commit a9828948ac
2 changed files with 4 additions and 3 deletions

View File

@ -72,8 +72,8 @@ class PickDirectoryDialog(
fetchDirectories(false)
}
private fun fetchDirectories(forceShowHidden: Boolean) {
activity.getCachedDirectories(forceShowHidden = forceShowHidden) {
private fun fetchDirectories(forceShowHiddenAndExcluded: Boolean) {
activity.getCachedDirectories(forceShowHidden = forceShowHiddenAndExcluded, forceShowExcluded = forceShowHiddenAndExcluded) {
if (it.isNotEmpty()) {
it.forEach {
it.subfoldersMediaCount = it.mediaCnt

View File

@ -636,6 +636,7 @@ fun Context.getCachedDirectories(
getVideosOnly: Boolean = false,
getImagesOnly: Boolean = false,
forceShowHidden: Boolean = false,
forceShowExcluded: Boolean = false,
callback: (ArrayList<Directory>) -> Unit
) {
ensureBackgroundThread {
@ -655,7 +656,7 @@ fun Context.getCachedDirectories(
}
val shouldShowHidden = config.shouldShowHidden || forceShowHidden
val excludedPaths = if (config.temporarilyShowExcluded) {
val excludedPaths = if (config.temporarilyShowExcluded || forceShowExcluded) {
HashSet()
} else {
config.excludedFolders