mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
lets show Set As and Edit button at videos too, why not
This commit is contained in:
parent
1cf6480695
commit
27476a0735
2 changed files with 0 additions and 6 deletions
|
@ -233,8 +233,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
menu.apply {
|
||||
findItem(R.id.menu_share_1).isVisible = !config.replaceShare
|
||||
findItem(R.id.menu_share_2).isVisible = config.replaceShare
|
||||
findItem(R.id.menu_set_as).isVisible = currentMedium.isImage()
|
||||
findItem(R.id.menu_edit).isVisible = currentMedium.isImage()
|
||||
findItem(R.id.menu_rotate).isVisible = currentMedium.isImage()
|
||||
findItem(R.id.menu_save_as).isVisible = mRotationDegrees != 0f
|
||||
findItem(R.id.menu_hide).isVisible = !currentMedium.name.startsWith('.')
|
||||
|
|
|
@ -108,8 +108,6 @@ 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_open_with).isVisible = selectedPositions.size == 1
|
||||
menu.findItem(R.id.cab_edit).isVisible = isOneImageSelected()
|
||||
menu.findItem(R.id.cab_set_as).isVisible = isOneImageSelected()
|
||||
menu.findItem(R.id.cab_confirm_selection).isVisible = isPickIntent && allowMultiplePicks && selectedPositions.size > 0
|
||||
|
||||
checkHideBtnVisibility(menu)
|
||||
|
@ -140,8 +138,6 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
|
||||
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
|
||||
}
|
||||
|
||||
private fun isOneImageSelected() = selectedPositions.size == 1 && media.size > selectedPositions.first() && media[selectedPositions.first()].isImage()
|
||||
}
|
||||
|
||||
private fun confirmSelection() {
|
||||
|
|
Loading…
Reference in a new issue