do not allow clicking bottom actions if faded away
This commit is contained in:
parent
e6980596a2
commit
3a7e93f095
|
@ -182,13 +182,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
bottom_delete.beGone()
|
||||
|
||||
bottom_edit.setOnClickListener {
|
||||
if (mUri != null) {
|
||||
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||
openEditor(mUri!!.toString())
|
||||
}
|
||||
}
|
||||
|
||||
bottom_share.setOnClickListener {
|
||||
if (mUri != null) {
|
||||
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||
sharePath(mUri!!.toString())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -762,21 +762,29 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun initBottomActionButtons() {
|
||||
bottom_favorite.setOnClickListener {
|
||||
if (bottom_actions.alpha == 1f) {
|
||||
toggleFavorite()
|
||||
}
|
||||
}
|
||||
|
||||
bottom_edit.setOnClickListener {
|
||||
if (bottom_actions.alpha == 1f) {
|
||||
openEditor(getCurrentPath())
|
||||
}
|
||||
}
|
||||
|
||||
bottom_share.setOnClickListener {
|
||||
if (bottom_actions.alpha == 1f) {
|
||||
shareMediumPath(getCurrentPath())
|
||||
}
|
||||
}
|
||||
|
||||
bottom_delete.setOnClickListener {
|
||||
if (bottom_actions.alpha == 1f) {
|
||||
checkDeleteConfirmation()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateFavoriteIcon(medium: Medium) {
|
||||
val icon = if (medium.isFavorite) R.drawable.ic_star_on else R.drawable.ic_star_off
|
||||
|
|
Loading…
Reference in New Issue