From 6c859be9de1f83ef2e4e22ea4bb3d000c46dcceb Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 7 Mar 2019 07:58:52 +0200 Subject: [PATCH] fix progress in new JSON parsing code --- .../net/ktnx/mobileledger/async/RetrieveTransactionsTask.java | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.39.5