diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-01 16:06:41 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-11-01 16:06:41 +0000 |
commit | 6a9b5b3d8917387765192efec3c086653aee0232 (patch) | |
tree | f8a2e9096b4f0260b8344ab7ffcf9afbb8e47e52 /app/src/main | |
parent | cf327fe8ae48c1eb93e1cfcaa73f903ab7073e55 (diff) | |
download | infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar.gz infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar.bz2 infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar.lz infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar.xz infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.tar.zst infinity-for-reddit-6a9b5b3d8917387765192efec3c086653aee0232.zip |
Fix wrong tint on the vote buttons after voting fails.
Diffstat (limited to 'app/src/main')
3 files changed, 59 insertions, 59 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java index bf1c24c9..2e6d8850 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java @@ -2848,8 +2848,8 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -2920,10 +2920,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -2953,9 +2953,9 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -3025,10 +3025,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -4173,8 +4173,8 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -4245,10 +4245,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -4274,8 +4274,8 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -4346,10 +4346,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -5538,8 +5538,8 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -5610,10 +5610,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -5643,8 +5643,8 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -5713,10 +5713,10 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter<Post, Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index 7ba89d67..1f7fcc2e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1190,12 +1190,12 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler contentMarkdownView.setLayoutManager(new SwipeLockLinearLayoutManager(mActivity, new SwipeLockInterface() { @Override public void lockSwipe() { - ((ViewPostDetailActivity) mActivity).lockSwipeRightToGoBack(); + mActivity.lockSwipeRightToGoBack(); } @Override public void unlockSwipe() { - ((ViewPostDetailActivity) mActivity).unlockSwipeRightToGoBack(); + mActivity.unlockSwipeRightToGoBack(); } })); @@ -1210,8 +1210,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -1279,10 +1279,10 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler mPost.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); mPostDetailRecyclerViewAdapterCallback.updatePost(mPost); } @@ -1304,8 +1304,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -1373,10 +1373,10 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler mPost.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); mPostDetailRecyclerViewAdapterCallback.updatePost(mPost); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index d650f195..4336129b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -2980,8 +2980,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -3052,10 +3052,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -3089,8 +3089,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -3161,10 +3161,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -4344,8 +4344,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -4416,10 +4416,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -4449,8 +4449,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -4521,10 +4521,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -5776,8 +5776,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getCurrentTextColor(); - int previousDownvoteButtonTextColor = downvoteButton.getCurrentTextColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); int previousScoreTextViewColor = scoreTextView.getCurrentTextColor(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -5848,10 +5848,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); scoreTextView.setTextColor(previousScoreTextViewColor); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); @@ -5881,8 +5881,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie return; } - int previousUpvoteButtonTextColor = upvoteButton.getTextColors().getDefaultColor(); - int previousDownvoteButtonTextColor = downvoteButton.getTextColors().getDefaultColor(); + ColorStateList previousUpvoteButtonIconTint = upvoteButton.getIconTint(); + ColorStateList previousDownvoteButtonIconTint = downvoteButton.getIconTint(); Drawable previousUpvoteButtonDrawable = upvoteButton.getIcon(); Drawable previousDownvoteButtonDrawable = downvoteButton.getIcon(); @@ -5954,10 +5954,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + previousVoteType)); } upvoteButton.setIcon(previousUpvoteButtonDrawable); - upvoteButton.setIconTint(ColorStateList.valueOf(previousUpvoteButtonTextColor)); - scoreTextView.setTextColor(previousUpvoteButtonTextColor); + upvoteButton.setIconTint(previousUpvoteButtonIconTint); + scoreTextView.setTextColor(previousUpvoteButtonIconTint); downvoteButton.setIcon(previousDownvoteButtonDrawable); - downvoteButton.setIconTint(ColorStateList.valueOf(previousDownvoteButtonTextColor)); + downvoteButton.setIconTint(previousDownvoteButtonIconTint); } EventBus.getDefault().post(new PostUpdateEventToPostDetailFragment(post)); |