]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java
transaction list always starts with the date of the first transaction
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / async / TransactionAccumulator.java
index 8f57e769174e763abaa2a204776319b08a0acf6e..1b96425681642a25580c13c7a8d2518e035051ae 100644 (file)
@@ -36,8 +36,10 @@ public class TransactionAccumulator {
     public void put(LedgerTransaction transaction, SimpleDate date) {
         if (done)
             throw new IllegalStateException("Can't put new items after done()");
-        if (null == latestDate)
+        if (null == latestDate) {
             latestDate = date;
+            list.add(new TransactionListItem(date, SimpleDate.today().month != date.month));
+        }
         earliestDate = date;
 
         if (!date.equals(lastDate)) {