mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
update the hidden folders check
This commit is contained in:
parent
411ae47136
commit
830f456359
1 changed files with 10 additions and 7 deletions
|
@ -114,16 +114,19 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
|
|||
var hiddenCnt = 0
|
||||
var unhiddenCnt = 0
|
||||
val positions = multiSelector.selectedPositions
|
||||
for (i in positions) {
|
||||
val path = dirs[i].path
|
||||
if (config.getIsFolderHidden(path))
|
||||
hiddenCnt++
|
||||
else
|
||||
unhiddenCnt++
|
||||
}
|
||||
positions.map { dirs[it].path }
|
||||
.forEach {
|
||||
if (config.getIsFolderHidden(it))
|
||||
hiddenCnt++
|
||||
else
|
||||
unhiddenCnt++
|
||||
}
|
||||
|
||||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue