aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java12
-rw-r--r--app/src/main/res/values/strings.xml1
2 files changed, 11 insertions, 2 deletions
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<Post, RecyclerView
if (nAwards > 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<Post, RecyclerView
if (nAwards > 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) {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6004a940..fb7082dd 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -694,5 +694,6 @@
<string name="delete_multi_reddit">Delete Multireddit</string>
<string name="n_awards">%1$d Awards</string>
+ <string name="one_award">1 Award</string>
</resources>