[UX] Fix back button opens drawer function always opening the drawer.

This commit is contained in:
Kacper Ziubryniewicz 2020-03-20 14:21:13 +01:00
parent 18c7eea89c
commit 6f1ec79d9b

View File

@ -1151,7 +1151,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
private var targetHomeId: Int = -1
override fun onBackPressed() {
if (!b.navView.onBackPressed()) {
if (App.config.ui.openDrawerOnBackPressed) {
if (App.config.ui.openDrawerOnBackPressed && navTarget.popTo == null && navTarget.popToHome) {
b.navView.drawer.toggle()
} else {
navigateUp()