From: Damyan Ivanov Date: Wed, 19 Dec 2018 20:23:53 +0000 (+0000) Subject: transactions may come in random order from the backend X-Git-Tag: v0.3~207 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=be05b80855f5e1f7d9d69426ed2a6ddfdd6d5a60;p=mobile-ledger.git transactions may come in random order from the backend --- diff --git a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java index e63f30d2..23f75c9c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -133,7 +133,8 @@ public class RetrieveTransactionsTask extends "found transaction %d → expecting " + "description", transactionId)); progress.setProgress(++transactionCount); - if (progress.getTotal() == Progress.INDETERMINATE) + if ((progress.getTotal() == Progress.INDETERMINATE) || + (progress.getTotal() < transactionId)) progress.setTotal(transactionId); publishProgress(progress); }