From ba096d9e39818e294ff959868be2e0b038f91451 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 10 Nov 2019 19:50:47 +0200 Subject: [PATCH] split ef/else/if into separate statements --- .../ktnx/mobileledger/ui/activity/NewTransactionModel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java index 66b01276..44327cbe 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionModel.java @@ -113,8 +113,10 @@ public class NewTransactionModel extends ViewModel { if (index == 0) { return header; } - else if (index <= items.size()) return items.get(index - 1); - else return trailer; + + if (index <= items.size()) return items.get(index - 1); + + return trailer; } // rules: // 1) at least two account names -- 2.39.5