From 0f8395221d2aaac18bd8640392edf632787bb3be Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 19 Apr 2020 13:16:23 +0800 Subject: Show 1 Award instead of 1 Awards. Version 3.0.3. --- .../infinityforreddit/Adapter/PostRecyclerViewAdapter.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index bce56b5c..38aa8b00 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -457,7 +457,11 @@ public class PostRecyclerViewAdapter extends PagedListAdapter 0) { ((PostViewHolder) holder).awardsTextView.setVisibility(View.VISIBLE); - ((PostViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.n_awards, nAwards)); + if (nAwards == 1) { + ((PostViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.one_award)); + } else { + ((PostViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.n_awards, nAwards)); + } } switch (voteType) { @@ -1014,7 +1018,11 @@ public class PostRecyclerViewAdapter extends PagedListAdapter 0) { ((PostCompactViewHolder) holder).awardsTextView.setVisibility(View.VISIBLE); - ((PostCompactViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.n_awards, post.getnAwards())); + if (nAwards == 1) { + ((PostCompactViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.one_award)); + } else { + ((PostCompactViewHolder) holder).awardsTextView.setText(mActivity.getString(R.string.n_awards, nAwards)); + } } switch (voteType) { -- cgit v1.2.3