Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-12-22 13:37:18 +01:00
commit ed2f4be490
2 changed files with 4 additions and 3 deletions

View file

@ -134,9 +134,9 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
int monthItemPosition = monthReportsSpinner.getSelectedItemPosition(); int monthItemPosition = monthReportsSpinner.getSelectedItemPosition();
String monthUrlString = monthsForReportsAdapter.getQueryString(monthItemPosition); String monthUrlString = monthsForReportsAdapter.getQueryString(monthItemPosition);
String countryUrlString = selectedCountryItem.getDownloadName(); String countryUrlString = selectedCountryItem.getDownloadName();
if (countryUrlString.length() > 0) { boolean isRecipientsReport = v.getId() == R.id.numberOfRecipientsLayout;
if (countryUrlString.length() > 0 || isRecipientsReport) {
Bundle bl = new Bundle(); Bundle bl = new Bundle();
boolean isRecipientsReport = v.getId() == R.id.numberOfRecipientsLayout;
bl.putString(UsersReportFragment.URL_REQUEST, bl.putString(UsersReportFragment.URL_REQUEST,
String.format(isRecipientsReport ? RECIPIENTS_BY_MONTH : USERS_RANKING_BY_MONTH, monthUrlString, countryUrlString)); String.format(isRecipientsReport ? RECIPIENTS_BY_MONTH : USERS_RANKING_BY_MONTH, monthUrlString, countryUrlString));
userReportFragment.setArguments(bl); userReportFragment.setArguments(bl);

View file

@ -122,6 +122,7 @@ public class UsersReportFragment extends BaseOsmAndDialogFragment {
text2.setTextColor(textSecondaryColor); text2.setTextColor(textSecondaryColor);
text1.setCompoundDrawablesWithIntrinsicBounds(drawableLeft, null, null, null); text1.setCompoundDrawablesWithIntrinsicBounds(drawableLeft, null, null, null);
text1.setCompoundDrawablePadding(getResources().getDimensionPixelSize(R.dimen.list_content_padding)); text1.setCompoundDrawablePadding(getResources().getDimensionPixelSize(R.dimen.list_content_padding));
text2.setPadding(text1.getTotalPaddingLeft(), text1.getTotalPaddingTop(), text1.getTotalPaddingRight(), text1.getTotalPaddingBottom());
Object item = getItem(position); Object item = getItem(position);
if (item instanceof UserRankingByMonth) { if (item instanceof UserRankingByMonth) {
UserRankingByMonth rankingByMonth = (UserRankingByMonth) item; UserRankingByMonth rankingByMonth = (UserRankingByMonth) item;