Refactoring

This commit is contained in:
PaulStets 2017-12-21 18:18:25 +02:00
parent fce7cb05e7
commit 6a9523f7b6

View file

@ -278,20 +278,20 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
}
};
recChangesByMontAsyncTask.setOnResponseListener(recResponseListener);
clearTextViewResult(recipientsTextView);
clearTextViewResult(donationsTextView);
clearTextViewResult(donationsTotalTextView);
if (recipientsTextView != null) {
recipientsTextView.setText("-");
}
if (donationsTextView != null) {
donationsTextView.setText("-");
}
if (donationsTotalTextView != null) {
donationsTotalTextView.setText("-");
}
String recfinalUrl = String.format(RECIPIENTS_BY_MONTH, monthUrlString, regionUrlString);
recChangesByMontAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, recfinalUrl);
}
private void clearTextViewResult(TextView textView) {
if (textView != null) {
textView.setText("-");
}
}
@Override
public void onSearchResult(CountryItem item) {
selectedCountryItem = item;