1
0
mirror of https://github.com/mihonapp/mihon.git synced 2025-10-08 20:39:34 +02:00

Drawerfix/readme update ()

* Fixed back button on navigational drawers

* Removing an unused import

* Cleaned up code

* little clean up
This commit is contained in:
Krishna Shukla
2016-12-23 20:26:10 +05:30
committed by inorichi
parent 2b63bae989
commit ec87e4359b

@@ -93,7 +93,9 @@ class MainActivity : BaseActivity() {
override fun onBackPressed() {
val fragment = supportFragmentManager.findFragmentById(R.id.frame_container)
if (fragment != null && fragment.tag.toInt() != startScreenId) {
if (drawer.isDrawerOpen(GravityCompat.START) || drawer.isDrawerOpen(GravityCompat.END)) {
drawer.closeDrawers()
} else if (fragment != null && fragment.tag.toInt() != startScreenId) {
if (resumed) {
setSelectedDrawerItem(startScreenId)
}