+ if (progress.getState() == RetrieveTransactionsTask.ProgressState.FINISHED) {
+ Logger.debug("progress", "Done");
+ b.transactionProgressLayout.setVisibility(View.GONE);
+
+ mainModel.transactionRetrievalDone();
+
+ String error = progress.getError();
+ if (error != null) {
+ if (error.equals(RetrieveTransactionsTask.Result.ERR_JSON_PARSER_ERROR))
+ error = getResources().getString(R.string.err_json_parser_error);
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage(error);
+ builder.setPositiveButton(R.string.btn_profile_options, (dialog, which) -> {
+ Logger.debug("error", "will start profile editor");
+ MobileLedgerProfile.startEditProfileActivity(this, profile);
+ });
+ builder.create()
+ .show();
+ return;
+ }
+
+ return;
+ }
+
+
+ b.transactionListCancelDownload.setEnabled(true);
+// ColorStateList csl = Colors.getColorStateList();
+// progressBar.setIndeterminateTintList(csl);
+// progressBar.setProgressTintList(csl);
+// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
+// progressBar.setProgress(0, false);
+// else
+// progressBar.setProgress(0);
+ b.transactionProgressLayout.setVisibility(View.VISIBLE);
+
+ if (progress.isIndeterminate() || (progress.getTotal() <= 0)) {
+ b.transactionListProgressBar.setIndeterminate(true);
+ Logger.debug("progress", "indeterminate");