mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-02-23 13:13:59 +01:00
Fixed subscribe error in SubredditListingFragment.
This commit is contained in:
parent
4085c0c40c
commit
8d5bf2c646
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user