From: Damyan Ivanov Date: Wed, 27 Feb 2019 17:21:04 +0000 (+0200) Subject: transaction retrieval: move cancel button enabling to the onPreExecute chain X-Git-Tag: v0.7~54 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e5e4785fe33ae777c966b5f5baf507a1074c3176;p=mobile-ledger.git transaction retrieval: move cancel button enabling to the onPreExecute chain --- 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);