From: Damyan Ivanov Date: Thu, 7 Mar 2019 05:58:52 +0000 (+0200) Subject: fix progress in new JSON parsing code X-Git-Tag: v0.8~22 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=6c859be9de1f83ef2e4e22ea4bb3d000c46dcceb;p=mobile-ledger.git fix progress in new JSON parsing code --- 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 88b36c8b..63e931d4 100644 --- a/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java +++ b/app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java @@ -474,6 +474,10 @@ public class RetrieveTransactionsTask progress.setTotal(maxTransactionId); } + if ((progress.getTotal() == Progress.INDETERMINATE) || + (progress.getTotal() < transaction.getId())) + progress.setTotal(transaction.getId()); + progress.setProgress(++processedTransactionCount); publishProgress(progress); }