mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-11 21:20:50 +01:00
Drawerfix/readme update (#601)
* Fixed back button on navigational drawers * Removing an unused import * Cleaned up code * little clean up
This commit is contained in:
parent
2b63bae989
commit
ec87e4359b
1 changed files with 4 additions and 2 deletions
|
@ -93,7 +93,9 @@ class MainActivity : BaseActivity() {
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
val fragment = supportFragmentManager.findFragmentById(R.id.frame_container)
|
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) {
|
if (resumed) {
|
||||||
setSelectedDrawerItem(startScreenId)
|
setSelectedDrawerItem(startScreenId)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue