feat(comments): click on username to open in anilist

This commit is contained in:
aayush262 2024-02-20 13:59:50 +05:30
parent 4f61f4cf2c
commit 84ae520f93

View file

@ -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 {