lets show Set As and Edit button at videos too, why not

This commit is contained in:
tibbi 2017-10-29 20:19:12 +01:00
parent 1cf6480695
commit 27476a0735
2 changed files with 0 additions and 6 deletions

View File

@ -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('.')

View File

@ -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() {