From 6c3a8c9340ea20c23171679ada4ac1f531592ec0 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 17 Jan 2021 23:02:28 +0800 Subject: Fix following users failed. --- .../infinityforreddit/activities/ViewSubredditDetailActivity.java | 2 +- .../infinityforreddit/activities/ViewUserDetailActivity.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java index bc5cb1d7..ddb7fb1e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java @@ -779,7 +779,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp if (subscriptionReady) { subscriptionReady = false; - if (subscribeSubredditChip.getText().equals(getResources().getString(R.string.subscribe))) { + if (getResources().getString(R.string.subscribe).contentEquals(subscribeSubredditChip.getText())) { SubredditSubscription.subscribeToSubreddit(mOauthRetrofit, mRetrofit, mAccessToken, subredditName, mAccountName, mRedditDataRoomDatabase, new SubredditSubscription.SubredditSubscriptionListener() { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java index 9884d797..ee88a095 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java @@ -69,8 +69,8 @@ import ml.docilealligator.infinityforreddit.DeleteThing; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.MarkPostAsReadInterface; -import ml.docilealligator.infinityforreddit.RecyclerViewContentScrollingInterface; import ml.docilealligator.infinityforreddit.R; +import ml.docilealligator.infinityforreddit.RecyclerViewContentScrollingInterface; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback; @@ -416,7 +416,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele if (subscriptionReady) { subscriptionReady = false; - if (subscribeUserChip.getText().equals(resources.getString(R.string.follow))) { + if (resources.getString(R.string.follow).contentEquals(subscribeUserChip.getText())) { UserFollowing.followUser(mOauthRetrofit, mRetrofit, mAccessToken, username, mAccountName, subscribedUserDao, new UserFollowing.UserFollowingListener() { @Override -- cgit v1.2.3