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 6b2267926..6782e9274 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -493,7 +493,11 @@ public class MainActivity extends CastEnabledActivity { String toPage = UserPreferences.getDefaultPage(); if (NavDrawerFragment.getLastNavFragment(this).equals(toPage) || UserPreferences.DEFAULT_PAGE_REMEMBER.equals(toPage)) { - super.onBackPressed(); + if (UserPreferences.backButtonOpensDrawer() && drawerLayout != null) { + drawerLayout.openDrawer(navDrawer); + } else { + super.onBackPressed(); + } } else { loadFragment(toPage, null); } diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java index e093c067d..f6bb286f9 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java @@ -133,5 +133,10 @@ public class PreferenceUpgrader { "" + UserPreferences.EPISODE_CACHE_SIZE_UNLIMITED).apply(); } } + if (oldVersion < 3000007) { + if (prefs.getString("prefBackButtonBehavior", "").equals("drawer")) { + prefs.edit().putBoolean(UserPreferences.PREF_BACK_OPENS_DRAWER, true).apply(); + } + } } } diff --git a/app/src/main/res/xml/preferences_user_interface.xml b/app/src/main/res/xml/preferences_user_interface.xml index f11b89be7..66b971089 100644 --- a/app/src/main/res/xml/preferences_user_interface.xml +++ b/app/src/main/res/xml/preferences_user_interface.xml @@ -88,6 +88,11 @@ android:title="@string/pref_default_page" android:summary="@string/pref_default_page_sum" android:defaultValue="HomeFragment"/> + Behavior Default Page Screen that is opened when starting AntennaPod. + Back button opens drawer + Pressing the back button on the default page opens the navigation drawer Remember last page Delete removes from Queue Automatically remove an episode from the queue when it is deleted.