diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-09-10 01:23:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-09-10 01:23:49 +0000 |
commit | f4515514c10d2f653a638bcdef6bc7ba1ac494b0 (patch) | |
tree | f876a268ce8fe75a632b09e904bd412281098a6f /app/src/main/java/ml/docilealligator/infinityforreddit | |
parent | c50da35b4f713c14b6b266466a0a1feaa1ad4c20 (diff) | |
download | infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar.gz infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar.bz2 infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar.lz infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar.xz infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.tar.zst infinity-for-reddit-f4515514c10d2f653a638bcdef6bc7ba1ac494b0.zip |
Fixed clicking username in comments in user's comment section opening current accout profile. Fixed downvote state would not retain after orientation change. Reverse the color of upvote and downvote buttons.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
2 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java index d0893b14..c20177b9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java @@ -544,12 +544,12 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVie } switch (comment.getVoteType()) { - case 1: + case CommentData.VOTE_TYPE_UPVOTE: ((CommentViewHolder) holder).upVoteButton .setColorFilter(ContextCompat.getColor(mActivity, R.color.upvoted), android.graphics.PorterDuff.Mode.SRC_IN); ((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.upvoted)); break; - case 2: + case CommentData.VOTE_TYPE_DOWNVOTE: ((CommentViewHolder) holder).downVoteButton .setColorFilter(ContextCompat.getColor(mActivity, R.color.downvoted), android.graphics.PorterDuff.Mode.SRC_IN); ((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.downvoted)); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java index 668a66b0..d148f026 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentsListingRecyclerViewAdapter.java @@ -117,7 +117,7 @@ class CommentsListingRecyclerViewAdapter extends PagedListAdapter<CommentData, R ((DataViewHolder) holder).authorTextView.setTextColor(mTextColorPrimaryDark); ((DataViewHolder) holder).authorTextView.setOnClickListener(view -> { Intent intent = new Intent(mContext, ViewUserDetailActivity.class); - intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, comment.getAuthor()); + intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, comment.getLinkAuthor()); mContext.startActivity(intent); }); } else { @@ -137,12 +137,12 @@ class CommentsListingRecyclerViewAdapter extends PagedListAdapter<CommentData, R ((DataViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore() + comment.getVoteType())); switch (comment.getVoteType()) { - case 1: + case CommentData.VOTE_TYPE_UPVOTE: ((DataViewHolder) holder).upvoteButton .setColorFilter(ContextCompat.getColor(mContext, R.color.upvoted), android.graphics.PorterDuff.Mode.SRC_IN); ((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.upvoted)); break; - case 2: + case CommentData.VOTE_TYPE_DOWNVOTE: ((DataViewHolder) holder).downvoteButton .setColorFilter(ContextCompat.getColor(mContext, R.color.downvoted), android.graphics.PorterDuff.Mode.SRC_IN); ((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.downvoted)); |