From bae2aa9ee13d2503282ab98618f0ae9a6822b8be Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 23 Apr 2021 05:09:41 +0000 Subject: [PATCH] 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 --- .../net/ktnx/mobileledger/async/TransactionAccumulator.java | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.39.2