diff options
2 files changed, 7 insertions, 8 deletions
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 5d7e2b79..a9c48b31 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -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); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 77f990a2..c374282d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -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; |