]> git.ktnx.net Git - mobile-ledger.git/commitdiff
Revert "speculatively update last update date before the transactions are stored"
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 23 Apr 2021 15:30:01 +0000 (15:30 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 23 Apr 2021 15:30:01 +0000 (15:30 +0000)
This reverts commit bae2aa9e

the code in question is run every time the transaction list is filtered
or updated. when the transaction list is updated it is OK to lie a bit,
but when the list is just filtered the timestamp of the data does not
change

app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java

index 62b962748b9bab4e3a0deda55e1fe77f2cc34bc9..46b8426abbae7aaf1b16b91fd975ed87af52640b 100644 (file)
 
 package net.ktnx.mobileledger.async;
 
-import net.ktnx.mobileledger.model.Data;
 import net.ktnx.mobileledger.model.LedgerTransaction;
 import net.ktnx.mobileledger.model.TransactionListItem;
 import net.ktnx.mobileledger.ui.MainModel;
 import net.ktnx.mobileledger.utils.SimpleDate;
 
 import java.util.ArrayList;
-import java.util.Date;
 
 public class TransactionAccumulator {
     private final ArrayList<TransactionListItem> list = new ArrayList<>();
@@ -67,7 +65,6 @@ public class TransactionAccumulator {
     public void done() {
         done = true;
         model.setDisplayedTransactions(list);
-        Data.lastUpdateDate.postValue(new Date());
         model.setFirstTransactionDate(earliestDate);
         model.setLastTransactionDate(latestDate);
     }