feat(comments): re-added Divider for reply
This commit is contained in:
parent
84ae520f93
commit
b2f01a24b2
2 changed files with 31 additions and 10 deletions
|
@ -55,18 +55,25 @@ class CommentItem(val comment: Comment,
|
|||
viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE
|
||||
if ((comment.replyCount ?: 0) > 0) {
|
||||
viewBinding.commentTotalReplies.visibility = View.VISIBLE
|
||||
viewBinding.commentRepliesDivider.visibility = View.VISIBLE
|
||||
viewBinding.commentTotalReplies.text = "View ${comment.replyCount} repl${if (comment.replyCount == 1) "y" else "ies"}"
|
||||
} else {
|
||||
viewBinding.commentTotalReplies.visibility = View.GONE
|
||||
viewBinding.commentRepliesDivider.visibility = View.GONE
|
||||
}
|
||||
viewBinding.commentReply.visibility = View.VISIBLE
|
||||
viewBinding.commentTotalReplies.setOnClickListener {
|
||||
viewBinding.commentTotalReplies.visibility = View.GONE
|
||||
viewBinding.commentRepliesDivider.visibility = View.GONE
|
||||
viewReplyCallback(this)
|
||||
}
|
||||
viewBinding.commentUserName.setOnClickListener {
|
||||
openLinkInBrowser("https://anilist.co/user/${comment.username}")
|
||||
}
|
||||
viewBinding.commentText.setOnLongClickListener {
|
||||
copyToClipboard(comment.content)
|
||||
true
|
||||
}
|
||||
var isEditing = false
|
||||
var isReplying = false
|
||||
viewBinding.commentEdit.setOnClickListener {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue