Commit 7de4a01d authored by Mygod's avatar Mygod

Refine back navigation for main activity

parent cceb4ad9
......@@ -448,7 +448,10 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
}
override def onBackPressed(): Unit =
if (currentFragment != profilesFragment) displayFragment(profilesFragment) else super.onBackPressed()
if (drawer.isDrawerOpen) drawer.closeDrawer() else if (currentFragment != profilesFragment) {
displayFragment(profilesFragment)
drawer.setSelection(DRAWER_PROFILES)
} else super.onBackPressed()
override def onStop() {
super.onStop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment