mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-11 18:57:11 +01:00
Fix unable to vote.
This commit is contained in:
parent
3dc2d9fee2
commit
9b796cf621
@ -1392,8 +1392,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (holder instanceof LoadMoreCommentsFailedViewHolder) {
|
||||
((LoadMoreCommentsFailedViewHolder) holder).errorTextView.setText(R.string.load_comments_failed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1872,7 +1870,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
|
||||
mDownvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousUpvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != 1) {
|
||||
//Not upvoted before
|
||||
mPost.setVoteType(1);
|
||||
newVoteType = RedditUtils.DIR_UPVOTE;
|
||||
@ -1946,7 +1944,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
|
||||
mUpvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousDownvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != -1) {
|
||||
//Not upvoted before
|
||||
mPost.setVoteType(-1);
|
||||
newVoteType = RedditUtils.DIR_DOWNVOTE;
|
||||
@ -2209,6 +2207,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
LoadMoreCommentsFailedViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
ButterKnife.bind(this, itemView);
|
||||
errorTextView.setText(R.string.load_comments_failed);
|
||||
retryButton.setOnClickListener(view -> mCommentRecyclerViewAdapterCallback.retryFetchingMoreComments());
|
||||
itemView.setBackgroundColor(mCommentBackgroundColor);
|
||||
errorTextView.setTextColor(mSecondaryTextColor);
|
||||
|
@ -609,7 +609,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
|
||||
((PostViewHolder) holder).downvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousUpvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != 1) {
|
||||
//Not upvoted before
|
||||
post.setVoteType(1);
|
||||
newVoteType = RedditUtils.DIR_UPVOTE;
|
||||
@ -680,7 +680,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
|
||||
((PostViewHolder) holder).upvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousDownvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != -1) {
|
||||
//Not downvoted before
|
||||
post.setVoteType(-1);
|
||||
newVoteType = RedditUtils.DIR_DOWNVOTE;
|
||||
@ -1155,7 +1155,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
|
||||
((PostCompactViewHolder) holder).downvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousUpvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != 1) {
|
||||
//Not upvoted before
|
||||
post.setVoteType(1);
|
||||
newVoteType = RedditUtils.DIR_UPVOTE;
|
||||
@ -1226,7 +1226,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
||||
|
||||
((PostCompactViewHolder) holder).upvoteButton.setColorFilter(mPostIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||
|
||||
if (previousDownvoteButtonColorFilter == null) {
|
||||
if (previousVoteType != -1) {
|
||||
//Not downvoted before
|
||||
post.setVoteType(-1);
|
||||
newVoteType = RedditUtils.DIR_DOWNVOTE;
|
||||
|
Loading…
Reference in New Issue
Block a user