]> git.ktnx.net Git - mobile-ledger.git/commitdiff
use the shortcut methods
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 31 Mar 2024 10:24:02 +0000 (13:24 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 31 Mar 2024 10:24:02 +0000 (13:24 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java

index 447e57e75f9313916d736d4635a010a6c869b1e2..807c16daf8540af877827e2729d0e848f733d3c3 100644 (file)
@@ -204,8 +204,8 @@ public class AccountSummaryFragment extends MobileLedgerListFragment {
             }
 
             if (last != null) {
-                if (last.getType() != AccountListItem.Type.ACCOUNT ||
-                    !((AccountListItem.Account) last).allAmountsAreZero())
+                if (!last.isAccount() || !last.toAccount()
+                                              .allAmountsAreZero())
                 {
                     newList.add(last);
                 }