diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-07-12 15:13:21 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-07-12 15:13:21 +0000 |
commit | f7361b9518419d92cc56ece7fe72995c7014f1e4 (patch) | |
tree | 5ed770f6e8d61b4436135dfdff2ea8066a3190bc /app/src/main/java/ml | |
parent | 67416fa3e47ecac67db667906e86bf8a58b31f45 (diff) | |
download | infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar.gz infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar.bz2 infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar.lz infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar.xz infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.tar.zst infinity-for-reddit-f7361b9518419d92cc56ece7fe72995c7014f1e4.zip |
Fix awarded comment's background color cannot be changed when searching.
Diffstat (limited to 'app/src/main/java/ml')
2 files changed, 4 insertions, 6 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index 6aa38fd3..55b216a5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -397,11 +397,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi if (holder instanceof CommentViewHolder) { Comment comment = getCurrentComment(position); if (comment != null) { - if (position == mSearchCommentIndex) { - holder.itemView.setBackgroundColor(Color.parseColor("#03A9F4")); - } else { - holder.itemView.setBackgroundColor(mCommentBackgroundColor); - } if (mIsSingleCommentThreadMode && comment.getId().equals(mSingleCommentId)) { holder.itemView.setBackgroundColor(mSingleCommentThreadBackgroundColor); } else if (comment.getAwards() != null && !comment.getAwards().equals("")) { @@ -520,6 +515,10 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi } else { ((CommentViewHolder) holder).saveButton.setImageResource(R.drawable.ic_bookmark_border_grey_24dp); } + + if (position == mSearchCommentIndex) { + holder.itemView.setBackgroundColor(Color.parseColor("#03A9F4")); + } } } else if (holder instanceof CommentFullyCollapsedViewHolder) { Comment comment = getCurrentComment(position); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index 13d19083..386aad91 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -12,7 +12,6 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.util.DisplayMetrics; -import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.LayoutInflater; import android.view.Menu; |