From: Damyan Ivanov Date: Fri, 23 Apr 2021 05:09:41 +0000 (+0000) Subject: speculatively update last update date before the transactions are stored X-Git-Tag: v0.18.0~42 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=bae2aa9ee13d2503282ab98618f0ae9a6822b8be speculatively update last update date before the transactions are stored this a white lie, because the displayed list is the new one, retrieved at the given time --- diff --git a/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java b/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java index 46b8426a..62b96274 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/TransactionAccumulator.java @@ -17,12 +17,14 @@ 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 list = new ArrayList<>(); @@ -65,6 +67,7 @@ public class TransactionAccumulator { public void done() { done = true; model.setDisplayedTransactions(list); + Data.lastUpdateDate.postValue(new Date()); model.setFirstTransactionDate(earliestDate); model.setLastTransactionDate(latestDate); }