From 78b26fefb58ed5b7406909dcc8e8e5113e502424 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Mon, 16 Mar 2020 16:59:47 +0100 Subject: [PATCH] Fixed clicking up arrow --- .../java/de/danoeh/antennapod/activity/MainActivity.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 de1e7b9b9..87cc20567 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -182,13 +182,12 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi @Override public void setSupportActionBar(@Nullable Toolbar toolbar) { - super.setSupportActionBar(toolbar); - drawerLayout.removeDrawerListener(drawerToggle); drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.drawer_open, R.string.drawer_close); drawerLayout.addDrawerListener(drawerToggle); drawerToggle.syncState(); + super.setSupportActionBar(toolbar); } private void saveLastNavFragment(String tag) { @@ -368,10 +367,6 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi loadChildFragment(fragment, TransitionEffect.NONE); } - public void dismissChildFragment() { - getSupportFragmentManager().popBackStack(); - } - private int getSelectedNavListIndex() { String currentFragment = getLastNavFragment(); if(currentFragment == null) { @@ -523,7 +518,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi return true; } else if (item.getItemId() == android.R.id.home) { if (getSupportFragmentManager().getBackStackEntryCount() > 0) { - dismissChildFragment(); + getSupportFragmentManager().popBackStack(); } return true; } else {