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 6287ac8..6b9ed63 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();