From be05b80855f5e1f7d9d69426ed2a6ddfdd6d5a60 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 19 Dec 2018 20:23:53 +0000 Subject: [PATCH] transactions may come in random order from the backend --- .../net/ktnx/mobileledger/async/RetrieveTransactionsTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.39.5