mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
do not allow renaming Favorites or Recycle bin
This commit is contained in:
parent
c75f564a35
commit
b7b49f579e
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue