]> git.ktnx.net Git - mobile-ledger.git/commitdiff
transactions may come in random order from the backend
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 19 Dec 2018 20:23:53 +0000 (20:23 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 19 Dec 2018 20:23:53 +0000 (20:23 +0000)
app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java

index e63f30d2d026cc30988b1f191f0a38657f67472e..23f75c9c47e702f84d2343421c3b63c0a45c899e 100644 (file)
@@ -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);
                                     }