aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-10-28 09:57:18 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-10-28 09:57:18 +0000
commit8d5bf2c6466c518523ed1068092c09c74d857654 (patch)
tree992129144c5b3a0106045541376edb66d8b14f5a
parent4085c0c40c20e13415994e13a30dc3152ef5b33a (diff)
downloadinfinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar.gz
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar.bz2
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar.lz
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar.xz
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.tar.zst
infinity-for-reddit-8d5bf2c6466c518523ed1068092c09c74d857654.zip
Fixed subscribe error in SubredditListingFragment.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java8
2 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
index ccca819d..21646e8d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/SubredditListingRecyclerViewAdapter.java
@@ -121,7 +121,7 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter<Subred
((DataViewHolder) holder).subscribeButton.setVisibility(View.VISIBLE);
((DataViewHolder) holder).subscribeButton.setOnClickListener(view -> {
SubredditSubscription.subscribeToSubreddit(oauthRetrofit, retrofit,
- accessToken, accountName, subredditData.getName(), redditDataRoomDatabase,
+ accessToken, subredditData.getName(), accountName, redditDataRoomDatabase,
new SubredditSubscription.SubredditSubscriptionListener() {
@Override
public void onSubredditSubscriptionSuccess() {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
index ef79dc90..09259c98 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java
@@ -121,8 +121,8 @@ public class ParsePost {
} else {
String selfTextPlain = Utils.trimTrailingWhitespace(
Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY))).toString();
- if (selfTextPlain.length() > 150) {
- selfTextPlain = selfTextPlain.substring(150);
+ if (selfTextPlain.length() > 250) {
+ selfTextPlain = selfTextPlain.substring(0, 250);
}
post.setSelfTextPlainTrimmed(selfTextPlain);
}
@@ -217,8 +217,8 @@ public class ParsePost {
} else {
String selfTextPlain = Utils.trimTrailingWhitespace(
Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY))).toString();
- if (selfTextPlain.length() > 150) {
- selfTextPlain = selfTextPlain.substring(150);
+ if (selfTextPlain.length() > 250) {
+ selfTextPlain = selfTextPlain.substring(0, 250);
}
post.setSelfTextPlainTrimmed(selfTextPlain);
}