Fix not going back on child fragments

This commit is contained in:
Petar Kukolj 2018-11-20 23:40:31 +01:00
parent 0d1b9c4c55
commit 98e75fc313
1 changed files with 2 additions and 0 deletions

View File

@ -648,6 +648,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
public void onBackPressed() { public void onBackPressed() {
if(isDrawerOpen()) { if(isDrawerOpen()) {
drawerLayout.closeDrawer(navDrawer); drawerLayout.closeDrawer(navDrawer);
} else if(getSupportFragmentManager().getBackStackEntryCount() != 0) {
super.onBackPressed();
} else { } else {
switch (UserPreferences.getBackButtonBehavior()) { switch (UserPreferences.getBackButtonBehavior()) {
case OPEN_DRAWER: case OPEN_DRAWER: