aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-04-19 05:16:23 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-04-19 05:16:23 +0000
commit0f8395221d2aaac18bd8640392edf632787bb3be (patch)
treec17979e5eb20a508307dc53c3cd7f98928fc3efe /app
parent499f507f88283c060ed5538474123b6d5f84bda2 (diff)
downloadinfinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar.gz
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar.bz2
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar.lz
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar.xz
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.tar.zst
infinity-for-reddit-0f8395221d2aaac18bd8640392edf632787bb3be.zip
Show 1 Award instead of 1 Awards. Version 3.0.3.
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java12
-rw-r--r--app/src/main/res/values/strings.xml1
3 files changed, 13 insertions, 4 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 92651f88..6a76e789 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,8 +6,8 @@ android {
applicationId "ml.docilealligator.infinityforreddit"
minSdkVersion 21
targetSdkVersion 29
- versionCode 32
- versionName "3.0.2"
+ versionCode 33
+ versionName "3.0.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
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>