From ecf7969c46d15e22a633b89a907e155aace4987a Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Tue, 23 Jan 2018 11:43:55 -0200 Subject: [PATCH] Improve settings up button behavior - Fix #736 --- .../java/org/schabi/newpipe/settings/SettingsActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index bfb19c23b..7f91a7ca1 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -72,7 +72,9 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { - finish(); + if (getSupportFragmentManager().getBackStackEntryCount() == 0) { + finish(); + } else getSupportFragmentManager().popBackStack(); } return true; }