]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix progress in new JSON parsing code
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 7 Mar 2019 05:58:52 +0000 (07:58 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 14 Mar 2019 20:54:57 +0000 (22:54 +0200)
app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java

index 88b36c8b4a8c27a2b9e510f8e17de27014a63311..63e931d49ae978143008a864806de5e1724cd86a 100644 (file)
@@ -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);
                     }