aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java21
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java8
2 files changed, 15 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
index fe1b851e..daf0cbb7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java
@@ -510,7 +510,15 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
mSingleCommentId = getIntent().getStringExtra(EXTRA_SINGLE_COMMENT_ID);
if (savedInstanceState == null) {
- if (!mRespectSubredditRecommendedSortType) {
+ if (mSingleCommentId != null) {
+ isSingleCommentThreadMode = true;
+ }
+ mMessageFullname = getIntent().getStringExtra(EXTRA_MESSAGE_FULLNAME);
+ mNewAccountName = getIntent().getStringExtra(EXTRA_NEW_ACCOUNT_NAME);
+ }
+
+ if (savedInstanceState == null) {
+ if (!mRespectSubredditRecommendedSortType || isSingleCommentThreadMode) {
sortType = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_POST_COMMENT, SortType.Type.BEST.value.toUpperCase());
if (sortType != null) {
mToolbar.setTitle(new SortType(SortType.Type.valueOf(sortType)).getType().fullName);
@@ -523,14 +531,6 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
}
}
- if (savedInstanceState == null) {
- if (mSingleCommentId != null) {
- isSingleCommentThreadMode = true;
- }
- mMessageFullname = getIntent().getStringExtra(EXTRA_MESSAGE_FULLNAME);
- mNewAccountName = getIntent().getStringExtra(EXTRA_NEW_ACCOUNT_NAME);
- }
-
orientation = resources.getConfiguration().orientation;
if (!mNullAccessToken && mAccessToken == null) {
@@ -1329,9 +1329,10 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
});
}
- public void changeToSingleThreadMode() {
+ public void changeToNomalThreadMode() {
isSingleCommentThreadMode = false;
mSingleCommentId = null;
+ mRespectSubredditRecommendedSortType = mSharedPreferences.getBoolean(SharedPreferencesUtils.RESPECT_SUBREDDIT_RECOMMENDED_COMMENT_SORT_TYPE, false);
refresh(false, true);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
index 96629464..3ae368c9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
@@ -3784,12 +3784,12 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
if (mActivity != null && mActivity instanceof ViewPostDetailActivity) {
mIsSingleCommentThreadMode = false;
mSingleCommentId = null;
- ((ViewPostDetailActivity) mActivity).changeToSingleThreadMode();
+ ((ViewPostDetailActivity) mActivity).changeToNomalThreadMode();
}
-
- itemView.setBackgroundColor(mColorAccent);
- ((TextView) itemView).setTextColor(mColorAccent);
});
+
+ itemView.setBackgroundTintList(ColorStateList.valueOf(mCommentBackgroundColor));
+ ((TextView) itemView).setTextColor(mColorAccent);
}
}
}