From 21ad67f7d768828a7f07f70e34f19c53f9b84275 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 24 Nov 2019 22:45:07 +0200 Subject: [PATCH] replace single case switch() with if() --- .../mobileledger/ui/activity/NewTransactionActivity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); -- 2.39.5