]> git.ktnx.net Git - mobile-ledger.git/commitdiff
replace single case switch() with if()
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 24 Nov 2019 20:45:07 +0000 (22:45 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 24 Nov 2019 20:45:07 +0000 (22:45 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java

index 6287ac8eca11662d764e8964ecfb86b8fa1ca3c2..6b9ed63557dc196a1bbd1115180d6aedab97db22 100644 (file)
@@ -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();