From 98e75fc313df0a6d1fc79485f6d58bfbf2c9bc96 Mon Sep 17 00:00:00 2001 From: Petar Kukolj Date: Tue, 20 Nov 2018 23:40:31 +0100 Subject: [PATCH] Fix not going back on child fragments --- .../main/java/de/danoeh/antennapod/activity/MainActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index d2a0c3aab..122b6040e 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -648,6 +648,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi public void onBackPressed() { if(isDrawerOpen()) { drawerLayout.closeDrawer(navDrawer); + } else if(getSupportFragmentManager().getBackStackEntryCount() != 0) { + super.onBackPressed(); } else { switch (UserPreferences.getBackButtonBehavior()) { case OPEN_DRAWER: