do not allow showing the Properties of Favorites and Recycle bin

This commit is contained in:
tibbi 2018-06-27 16:09:26 +02:00
parent e0f8d311ba
commit f54616bf3f
1 changed files with 3 additions and 2 deletions

View File

@ -148,11 +148,11 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
private fun showProperties() { private fun showProperties() {
if (selectedPositions.size <= 1) { if (selectedPositions.size <= 1) {
val path = dirs[selectedPositions.first()].path val path = dirs[selectedPositions.first()].path
if (path != FAVORITES) { if (path != FAVORITES && path != RECYCLE_BIN) {
PropertiesDialog(activity, dirs[selectedPositions.first()].path, config.shouldShowHidden) PropertiesDialog(activity, dirs[selectedPositions.first()].path, config.shouldShowHidden)
} }
} else { } else {
PropertiesDialog(activity, getSelectedPaths().filter { it != FAVORITES }.toList(), config.shouldShowHidden) PropertiesDialog(activity, getSelectedPaths().filter { it != FAVORITES && it != RECYCLE_BIN }.toList(), config.shouldShowHidden)
} }
} }
@ -364,6 +364,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
finishActMode() finishActMode()
} else { } else {
selectedPositions.remove(it) selectedPositions.remove(it)
toggleItemSelection(false, it)
} }
} else { } else {
folders.add(File(directory.path)) folders.add(File(directory.path))