]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix comparison of transaction date delimiter contents
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 22 Apr 2021 04:24:44 +0000 (04:24 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 22 Apr 2021 04:24:44 +0000 (04:24 +0000)
it is possible that a delimiter that showed the month name no longer
does and vice versa

app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java

index 599a9f8c8024e39e020a63485be749e1f5e0f27d..a024b193e403d2a7bb95da1daac5c660af58e66c 100644 (file)
@@ -68,8 +68,7 @@ public class TransactionListAdapter extends RecyclerView.Adapter<TransactionRowH
                                               @NonNull TransactionListItem newItem) {
                 switch (oldItem.getType()) {
                     case DELIMITER:
-                        // Delimiters items are "same" for same dates and the contents are the date
-                        return true;
+                        return oldItem.isMonthShown() == newItem.isMonthShown();
                     case TRANSACTION:
                         return oldItem.getTransaction()
                                       .equals(newItem.getTransaction()) &&