mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Ensure bottom navigation bar is visible on back navigation
This commit is contained in:
parent
7d96e94689
commit
cc7ce34021
1 changed files with 10 additions and 5 deletions
|
|
@ -381,7 +381,8 @@ after opening the app.
|
||||||
if (contributionsFragment?.backButtonClicked() != true) { //If this one does not want to handle
|
if (contributionsFragment?.backButtonClicked() != true) { //If this one does not want to handle
|
||||||
// the back press, let the activity do so
|
// the back press, let the activity do so
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
showTabs()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ActiveFragment.NEARBY -> {
|
ActiveFragment.NEARBY -> {
|
||||||
// Means that nearby fragment is visible
|
// Means that nearby fragment is visible
|
||||||
|
|
@ -390,7 +391,8 @@ after opening the app.
|
||||||
supportFragmentManager.beginTransaction().remove(it).commit()
|
supportFragmentManager.beginTransaction().remove(it).commit()
|
||||||
}
|
}
|
||||||
setSelectedItemId(NavTab.CONTRIBUTIONS.code())
|
setSelectedItemId(NavTab.CONTRIBUTIONS.code())
|
||||||
}
|
showTabs()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ActiveFragment.EXPLORE -> {
|
ActiveFragment.EXPLORE -> {
|
||||||
// Explore Fragment is visible
|
// Explore Fragment is visible
|
||||||
|
|
@ -400,15 +402,18 @@ after opening the app.
|
||||||
} else {
|
} else {
|
||||||
setSelectedItemId(NavTab.CONTRIBUTIONS.code())
|
setSelectedItemId(NavTab.CONTRIBUTIONS.code())
|
||||||
}
|
}
|
||||||
}
|
showTabs()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ActiveFragment.BOOKMARK -> {
|
ActiveFragment.BOOKMARK -> {
|
||||||
// Means that bookmark fragment is visible
|
// Means that bookmark fragment is visible
|
||||||
bookmarkFragment?.onBackPressed()
|
bookmarkFragment?.onBackPressed()
|
||||||
}
|
showTabs()
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
showTabs()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue