aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2022-02-28 10:12:13 +0000
committerDocile-Alligator <chineseperson5@gmail.com>2022-02-28 10:12:13 +0000
commitf0589ada3e5d47d70eb39f81190291044e9281f5 (patch)
tree0d80057cd6099461d736ea8321b619f450ee3b8b /app/src/main/java
parent2e67298813483a949b52510893541e8cb6b81683 (diff)
downloadinfinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar.gz
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar.bz2
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar.lz
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar.xz
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.tar.zst
infinity-for-reddit-f0589ada3e5d47d70eb39f81190291044e9281f5.zip
Show and open r/u_ style subreddits in comments.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java25
1 files changed, 6 insertions, 19 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
index 6666d9a0..7ebfb52e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
@@ -51,7 +51,6 @@ import ml.docilealligator.infinityforreddit.activities.BaseActivity;
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
import ml.docilealligator.infinityforreddit.activities.ViewPostDetailActivity;
import ml.docilealligator.infinityforreddit.activities.ViewSubredditDetailActivity;
-import ml.docilealligator.infinityforreddit.activities.ViewUserDetailActivity;
import ml.docilealligator.infinityforreddit.bottomsheetfragments.CommentMoreBottomSheetFragment;
import ml.docilealligator.infinityforreddit.bottomsheetfragments.UrlMenuBottomSheetFragment;
import ml.docilealligator.infinityforreddit.comment.Comment;
@@ -194,15 +193,9 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
if (holder instanceof CommentViewHolder) {
Comment comment = getItem(holder.getBindingAdapterPosition());
if (comment != null) {
- if (comment.getSubredditName().substring(2).equals(comment.getLinkAuthor())) {
- String name = "u/" + comment.getLinkAuthor();
- ((CommentViewHolder) holder).authorTextView.setText(name);
- ((CommentViewHolder) holder).authorTextView.setTextColor(mUsernameColor);
- } else {
- String name = "r/" + comment.getSubredditName();
- ((CommentViewHolder) holder).authorTextView.setText(name);
- ((CommentViewHolder) holder).authorTextView.setTextColor(mSubredditColor);
- }
+ String name = "r/" + comment.getSubredditName();
+ ((CommentViewHolder) holder).authorTextView.setText(name);
+ ((CommentViewHolder) holder).authorTextView.setTextColor(mSubredditColor);
if (comment.getAuthorFlairHTML() != null && !comment.getAuthorFlairHTML().equals("")) {
((CommentViewHolder) holder).authorFlairTextView.setVisibility(View.VISIBLE);
@@ -466,15 +459,9 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
}
Comment comment = getItem(getBindingAdapterPosition());
if (comment != null) {
- if (comment.getSubredditName().substring(2).equals(comment.getLinkAuthor())) {
- Intent intent = new Intent(mActivity, ViewUserDetailActivity.class);
- intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, comment.getLinkAuthor());
- mActivity.startActivity(intent);
- } else {
- Intent intent = new Intent(mActivity, ViewSubredditDetailActivity.class);
- intent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, comment.getSubredditName());
- mActivity.startActivity(intent);
- }
+ Intent intent = new Intent(mActivity, ViewSubredditDetailActivity.class);
+ intent.putExtra(ViewSubredditDetailActivity.EXTRA_SUBREDDIT_NAME_KEY, comment.getSubredditName());
+ mActivity.startActivity(intent);
}
});