mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
do not show the Edit button at long pressing video
This commit is contained in:
parent
fd59d0d9aa
commit
23696bff32
1 changed files with 3 additions and 2 deletions
|
@ -96,8 +96,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
override fun onPrepareActionMode(actionMode: ActionMode?, menu: Menu): Boolean {
|
||||||
menu.findItem(R.id.cab_rename).isVisible = multiSelector.selectedPositions.size <= 1
|
val selections = multiSelector.selectedPositions
|
||||||
menu.findItem(R.id.cab_edit).isVisible = multiSelector.selectedPositions.size <= 1
|
menu.findItem(R.id.cab_rename).isVisible = selections.size <= 1
|
||||||
|
menu.findItem(R.id.cab_edit).isVisible = selections.size == 1 && media[selections[0]].isImage()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue