From: Damyan Ivanov Date: Sun, 24 Nov 2019 20:45:07 +0000 (+0200) Subject: replace single case switch() with if() X-Git-Tag: v0.11.0~35 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=21ad67f7d768828a7f07f70e34f19c53f9b84275;p=mobile-ledger.git replace single case switch() with if() --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java index 6287ac8e..6b9ed635 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java @@ -83,13 +83,13 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas } @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - finish(); - return true; + if (item.getItemId() == android.R.id.home) { + finish(); + return true; } return super.onOptionsItemSelected(item); } + @Override protected void onStart() { super.onStart();