]> git.ktnx.net Git - mobile-ledger.git/commitdiff
transaction retrieval: move cancel button enabling to the onPreExecute chain
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 17:21:04 +0000 (19:21 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 17:21:04 +0000 (19:21 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index 958c0e919745f6dd96dc6820db772c6be6bc2081..558ca691da3a49ec8e3b1132a70b1d0e9481b8b0 100644 (file)
@@ -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);