mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-02-07 08:34:37 +01:00
[UX] Fix app quiting in home when back button opens drawer function active.
This commit is contained in:
parent
20f16c25a3
commit
87ae5787ee
@ -1151,7 +1151,8 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
|||||||
private var targetHomeId: Int = -1
|
private var targetHomeId: Int = -1
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
if (!b.navView.onBackPressed()) {
|
if (!b.navView.onBackPressed()) {
|
||||||
if (App.config.ui.openDrawerOnBackPressed && navTarget.popTo == null && navTarget.popToHome) {
|
if (App.config.ui.openDrawerOnBackPressed && ((navTarget.popTo == null && navTarget.popToHome)
|
||||||
|
|| navTarget.id == DRAWER_ITEM_HOME)) {
|
||||||
b.navView.drawer.toggle()
|
b.navView.drawer.toggle()
|
||||||
} else {
|
} else {
|
||||||
navigateUp()
|
navigateUp()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user