mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
add an aditional check at determining if Edit menu button will be shown
This commit is contained in:
parent
9452d96e75
commit
b0be8c0481
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
|
||||
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
||||
menu.findItem(R.id.cab_rename).isVisible = selectedPositions.size <= 1
|
||||
menu.findItem(R.id.cab_edit).isVisible = selectedPositions.size == 1 && media[selectedPositions.first()].isImage()
|
||||
menu.findItem(R.id.cab_edit).isVisible = selectedPositions.size == 1 && media.size > selectedPositions.first() && media[selectedPositions.first()].isImage()
|
||||
|
||||
checkHideBtnVisibility(menu)
|
||||
|
||||
|
|
Loading…
Reference in a new issue