make sure the proper bottom actions are shown at third party intent handling
This commit is contained in:
parent
065f2acee4
commit
adc5b9b856
2 changed files with 7 additions and 3 deletions
|
@ -178,15 +178,19 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
}
|
||||
|
||||
private fun initBottomActionButtons() {
|
||||
bottom_favorite.beGone()
|
||||
bottom_delete.beGone()
|
||||
arrayListOf(bottom_favorite, bottom_delete, bottom_rotate, bottom_properties, bottom_lock_orientation, bottom_slideshow, bottom_show_on_map, bottom_toggle_file_visibility).forEach {
|
||||
it.beGone()
|
||||
}
|
||||
|
||||
val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0
|
||||
bottom_edit.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_EDIT != 0)
|
||||
bottom_edit.setOnClickListener {
|
||||
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||
openEditor(mUri!!.toString())
|
||||
}
|
||||
}
|
||||
|
||||
bottom_share.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_SHARE != 0)
|
||||
bottom_share.setOnClickListener {
|
||||
if (mUri != null && bottom_actions.alpha == 1f) {
|
||||
sharePath(mUri!!.toString())
|
||||
|
|
|
@ -768,7 +768,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun initBottomActionButtons() {
|
||||
val visibleBottomActions = config.visibleBottomActions
|
||||
val visibleBottomActions = if (config.bottomActions) config.visibleBottomActions else 0
|
||||
bottom_favorite.beVisibleIf(visibleBottomActions and BOTTOM_ACTION_TOGGLE_FAVORITE != 0)
|
||||
bottom_favorite.setOnClickListener {
|
||||
if (bottom_actions.alpha == 1f) {
|
||||
|
|
Loading…
Reference in a new issue