fix(comment): only show highlight for owner

Fixes a problem where, due to the way recycler views work, the show highlight was not reset properly, causing the highlight to be displayed on the wrong users.
This commit is contained in:
FineFindus 2023-11-15 19:03:35 +01:00
parent 7a69650125
commit 27c175648b
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B

View File

@ -73,9 +73,7 @@ class CommentsAdapter(
val comment = comments[position] val comment = comments[position]
holder.binding.apply { holder.binding.apply {
commentAuthor.text = comment.author commentAuthor.text = comment.author
if (comment.channelOwner) { commentAuthor.setBackgroundResource(if (comment.channelOwner) R.drawable.comment_channel_owner_bg else 0)
commentAuthor.setBackgroundResource(R.drawable.comment_channel_owner_bg)
}
commentInfos.text = TextUtils.SEPARATOR + comment.commentedTime commentInfos.text = TextUtils.SEPARATOR + comment.commentedTime
commentText.movementMethod = LinkMovementMethodCompat.getInstance() commentText.movementMethod = LinkMovementMethodCompat.getInstance()