diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-12-01 06:52:36 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-12-01 06:52:36 +0000 |
commit | a18c9129872ea6a69884652c6b56663e3539016d (patch) | |
tree | ffa3f68339b9c0e98fd7881f8555a78511d87f3c /app | |
parent | 924128f09aa3c514bcbe74af65ad4feb05c774dc (diff) | |
download | infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar.gz infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar.bz2 infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar.lz infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar.xz infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.tar.zst infinity-for-reddit-a18c9129872ea6a69884652c6b56663e3539016d.zip |
Show upvoted or downvoted color in topScoreTextView in CommentViewHolder.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java index 6204934f..682f7157 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java @@ -1112,11 +1112,13 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy ((CommentViewHolder) holder).upvoteButton .setColorFilter(mUpvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); ((CommentViewHolder) holder).scoreTextView.setTextColor(mUpvotedColor); + ((CommentViewHolder) holder).topScoreTextView.setTextColor(mUpvotedColor); break; case Comment.VOTE_TYPE_DOWNVOTE: ((CommentViewHolder) holder).downvoteButton .setColorFilter(mDownvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); ((CommentViewHolder) holder).scoreTextView.setTextColor(mDownvotedColor); + ((CommentViewHolder) holder).topScoreTextView.setTextColor(mDownvotedColor); break; } @@ -3459,12 +3461,14 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy newVoteType = APIUtils.DIR_UPVOTE; upvoteButton.setColorFilter(mUpvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mUpvotedColor); + topScoreTextView.setTextColor(mUpvotedColor); } else { //Upvoted before comment.setVoteType(Comment.VOTE_TYPE_NO_VOTE); newVoteType = APIUtils.DIR_UNVOTE; upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mCommentIconAndInfoColor); + topScoreTextView.setTextColor(mSecondaryTextColor); } scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, @@ -3480,10 +3484,12 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy comment.setVoteType(Comment.VOTE_TYPE_UPVOTE); upvoteButton.setColorFilter(mUpvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mUpvotedColor); + topScoreTextView.setTextColor(mUpvotedColor); } else { comment.setVoteType(Comment.VOTE_TYPE_NO_VOTE); upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mCommentIconAndInfoColor); + topScoreTextView.setTextColor(mSecondaryTextColor); } downvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); @@ -3525,12 +3531,14 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy newVoteType = APIUtils.DIR_DOWNVOTE; downvoteButton.setColorFilter(mDownvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mDownvotedColor); + topScoreTextView.setTextColor(mDownvotedColor); } else { //Downvoted before comment.setVoteType(Comment.VOTE_TYPE_NO_VOTE); newVoteType = APIUtils.DIR_UNVOTE; downvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mCommentIconAndInfoColor); + topScoreTextView.setTextColor(mSecondaryTextColor); } scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, @@ -3546,10 +3554,12 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy comment.setVoteType(Comment.VOTE_TYPE_DOWNVOTE); downvoteButton.setColorFilter(mDownvotedColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mDownvotedColor); + topScoreTextView.setTextColor(mDownvotedColor); } else { comment.setVoteType(Comment.VOTE_TYPE_NO_VOTE); downvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setTextColor(mCommentIconAndInfoColor); + topScoreTextView.setTextColor(mSecondaryTextColor); } upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); |