From: Damyan Ivanov Date: Sun, 10 Nov 2019 17:50:47 +0000 (+0200) Subject: split ef/else/if into separate statements X-Git-Tag: v0.11.0~80 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=ba096d9e39818e294ff959868be2e0b038f91451;p=mobile-ledger.git split ef/else/if into separate statements --- 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