From e5e4785fe33ae777c966b5f5baf507a1074c3176 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 27 Feb 2019 19:21:04 +0200 Subject: [PATCH] transaction retrieval: move cancel button enabling to the onPreExecute chain --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 958c0e91..558ca691 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -389,7 +389,6 @@ public class MainActivity extends CrashReportingActivity { retrieveTransactionsTask = new RetrieveTransactionsTask(new WeakReference<>(this)); retrieveTransactionsTask.execute(); - bTransactionListCancelDownload.setEnabled(true); } public void onStopTransactionRefreshClick(View view) { Log.d("interactive", "Cancelling transactions refresh"); @@ -407,6 +406,7 @@ public class MainActivity extends CrashReportingActivity { else Toast.makeText(this, error, Toast.LENGTH_LONG).show(); } public void onRetrieveStart() { + bTransactionListCancelDownload.setEnabled(true); progressBar.setIndeterminateTintList(ColorStateList.valueOf(Colors.primary)); progressBar.setProgressTintList(ColorStateList.valueOf(Colors.primary)); progressBar.setIndeterminate(true); -- 2.39.5