do not allow renaming Favorites or Recycle bin
This commit is contained in:
parent
c75f564a35
commit
b7b49f579e
|
@ -71,8 +71,9 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
override fun getItemCount() = dirs.size
|
||||
|
||||
override fun prepareActionMode(menu: Menu) {
|
||||
val selectedPaths = getSelectedPaths()
|
||||
menu.apply {
|
||||
findItem(R.id.cab_rename).isVisible = isOneItemSelected()
|
||||
findItem(R.id.cab_rename).isVisible = isOneItemSelected() && !selectedPaths.contains(FAVORITES) && !selectedPaths.contains(RECYCLE_BIN)
|
||||
findItem(R.id.cab_change_cover_image).isVisible = isOneItemSelected()
|
||||
|
||||
checkHideBtnVisibility(this)
|
||||
|
|
Loading…
Reference in New Issue