mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
making the visibility toggling function a bit clearer to read
This commit is contained in:
parent
8ca190d8ef
commit
e765332e3b
1 changed files with 14 additions and 15 deletions
|
@ -235,21 +235,20 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
hideFolders(selectedPaths)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
selectedPaths.filter { it != FAVORITES && it != RECYCLE_BIN && (selectedPaths.size == 1 || !activity.config.isFolderProtected(it)) }.forEach {
|
||||
val path = it
|
||||
activity.handleLockedFolderOpening(path) { success ->
|
||||
if (success) {
|
||||
if (path.containsNoMedia()) {
|
||||
activity.removeNoMedia(path) {
|
||||
if (activity.config.shouldShowHidden) {
|
||||
updateFolderNames()
|
||||
} else {
|
||||
activity.runOnUiThread {
|
||||
listener?.refreshItems()
|
||||
finishActMode()
|
||||
} else {
|
||||
selectedPaths.filter { it != FAVORITES && it != RECYCLE_BIN && (selectedPaths.size == 1 || !activity.config.isFolderProtected(it)) }.forEach {
|
||||
val path = it
|
||||
activity.handleLockedFolderOpening(path) { success ->
|
||||
if (success) {
|
||||
if (path.containsNoMedia()) {
|
||||
activity.removeNoMedia(path) {
|
||||
if (activity.config.shouldShowHidden) {
|
||||
updateFolderNames()
|
||||
} else {
|
||||
activity.runOnUiThread {
|
||||
listener?.refreshItems()
|
||||
finishActMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue