mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Update menu visibility logic to reflect Map tab selection
This commit is contained in:
parent
7ae72f1e92
commit
772f1028df
1 changed files with 2 additions and 4 deletions
|
|
@ -177,6 +177,7 @@ class ExploreFragment : CommonsDaggerSupportFragment() {
|
|||
override fun onPageScrollStateChanged(state: Int) = Unit
|
||||
override fun onPageSelected(position: Int) {
|
||||
binding!!.viewPager.canScroll = position != 2
|
||||
others.setVisible(position == 2)
|
||||
if (position == 2) {
|
||||
mapRootFragment?.requestLocationIfNeeded()
|
||||
}
|
||||
|
|
@ -194,7 +195,6 @@ class ExploreFragment : CommonsDaggerSupportFragment() {
|
|||
*/
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
// Handle item selection
|
||||
|
||||
when (item.itemId) {
|
||||
R.id.action_search -> {
|
||||
startActivityWithFlags(requireActivity(), SearchActivity::class.java)
|
||||
|
|
@ -225,5 +225,3 @@ class ExploreFragment : CommonsDaggerSupportFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue