making the visibility toggling function a bit clearer to read

This commit is contained in:
tibbi 2020-04-18 12:27:39 +02:00
parent 8ca190d8ef
commit e765332e3b

View file

@ -235,21 +235,20 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
hideFolders(selectedPaths) hideFolders(selectedPaths)
} }
} }
return } else {
} selectedPaths.filter { it != FAVORITES && it != RECYCLE_BIN && (selectedPaths.size == 1 || !activity.config.isFolderProtected(it)) }.forEach {
val path = it
selectedPaths.filter { it != FAVORITES && it != RECYCLE_BIN && (selectedPaths.size == 1 || !activity.config.isFolderProtected(it)) }.forEach { activity.handleLockedFolderOpening(path) { success ->
val path = it if (success) {
activity.handleLockedFolderOpening(path) { success -> if (path.containsNoMedia()) {
if (success) { activity.removeNoMedia(path) {
if (path.containsNoMedia()) { if (activity.config.shouldShowHidden) {
activity.removeNoMedia(path) { updateFolderNames()
if (activity.config.shouldShowHidden) { } else {
updateFolderNames() activity.runOnUiThread {
} else { listener?.refreshItems()
activity.runOnUiThread { finishActMode()
listener?.refreshItems() }
finishActMode()
} }
} }
} }