mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-17 22:08:00 +01:00
Merge pull request #2696 from Aga-C/show_excluded_in_folder_picker
Changed show hidden button in folder picker to include excluded (#2693)
This commit is contained in:
commit
8c463b5783
2 changed files with 4 additions and 3 deletions
|
@ -72,8 +72,8 @@ class PickDirectoryDialog(
|
||||||
fetchDirectories(false)
|
fetchDirectories(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchDirectories(forceShowHidden: Boolean) {
|
private fun fetchDirectories(forceShowHiddenAndExcluded: Boolean) {
|
||||||
activity.getCachedDirectories(forceShowHidden = forceShowHidden) {
|
activity.getCachedDirectories(forceShowHidden = forceShowHiddenAndExcluded, forceShowExcluded = forceShowHiddenAndExcluded) {
|
||||||
if (it.isNotEmpty()) {
|
if (it.isNotEmpty()) {
|
||||||
it.forEach {
|
it.forEach {
|
||||||
it.subfoldersMediaCount = it.mediaCnt
|
it.subfoldersMediaCount = it.mediaCnt
|
||||||
|
|
|
@ -636,6 +636,7 @@ fun Context.getCachedDirectories(
|
||||||
getVideosOnly: Boolean = false,
|
getVideosOnly: Boolean = false,
|
||||||
getImagesOnly: Boolean = false,
|
getImagesOnly: Boolean = false,
|
||||||
forceShowHidden: Boolean = false,
|
forceShowHidden: Boolean = false,
|
||||||
|
forceShowExcluded: Boolean = false,
|
||||||
callback: (ArrayList<Directory>) -> Unit
|
callback: (ArrayList<Directory>) -> Unit
|
||||||
) {
|
) {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
|
@ -655,7 +656,7 @@ fun Context.getCachedDirectories(
|
||||||
}
|
}
|
||||||
|
|
||||||
val shouldShowHidden = config.shouldShowHidden || forceShowHidden
|
val shouldShowHidden = config.shouldShowHidden || forceShowHidden
|
||||||
val excludedPaths = if (config.temporarilyShowExcluded) {
|
val excludedPaths = if (config.temporarilyShowExcluded || forceShowExcluded) {
|
||||||
HashSet()
|
HashSet()
|
||||||
} else {
|
} else {
|
||||||
config.excludedFolders
|
config.excludedFolders
|
||||||
|
|
Loading…
Reference in a new issue