Improve settings up button behavior

- Fix #736
This commit is contained in:
Mauricio Colli 2018-01-23 11:43:55 -02:00
parent a473e3d623
commit ecf7969c46
No known key found for this signature in database
GPG Key ID: F200BFD6F29DDD85
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}