From 84ae520f939e23fc91afa0cd5a5f7e467d9cc6aa Mon Sep 17 00:00:00 2001 From: aayush262 Date: Tue, 20 Feb 2024 13:59:50 +0530 Subject: [PATCH] feat(comments): click on username to open in anilist --- .../main/java/ani/dantotsu/media/comments/CommentItem.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/ani/dantotsu/media/comments/CommentItem.kt b/app/src/main/java/ani/dantotsu/media/comments/CommentItem.kt index 3b4c467a..43619d35 100644 --- a/app/src/main/java/ani/dantotsu/media/comments/CommentItem.kt +++ b/app/src/main/java/ani/dantotsu/media/comments/CommentItem.kt @@ -6,9 +6,12 @@ import androidx.recyclerview.widget.LinearLayoutManager import ani.dantotsu.R import ani.dantotsu.connections.comments.Comment import ani.dantotsu.connections.comments.CommentsAPI +import ani.dantotsu.copyToClipboard import ani.dantotsu.currActivity import ani.dantotsu.databinding.ItemCommentsBinding import ani.dantotsu.loadImage +import ani.dantotsu.openLinkInBrowser +import ani.dantotsu.others.ImageViewDialog import ani.dantotsu.snackString import com.xwray.groupie.GroupieAdapter import com.xwray.groupie.Section @@ -61,6 +64,9 @@ class CommentItem(val comment: Comment, viewBinding.commentTotalReplies.visibility = View.GONE viewReplyCallback(this) } + viewBinding.commentUserName.setOnClickListener { + openLinkInBrowser("https://anilist.co/user/${comment.username}") + } var isEditing = false var isReplying = false viewBinding.commentEdit.setOnClickListener {