fix: 修复评价详情回复列表内容高亮可复制文本不生效的问题 https://jira.shanqu.cc/browse/GHZS-1207

This commit is contained in:
chenjuntao
2023-02-08 14:26:21 +08:00
parent f39010f2cb
commit 3972b6fa17

View File

@ -273,10 +273,6 @@ class RatingReplyAdapter(
likeCountTv.setDrawableStart(R.drawable.comment_vote_unselect)
}
likeCountTv.text = if (replyEntity.vote > 0) NumberUtils.transSimpleCount(replyEntity.vote) else ""
contentTv.setTextWithHighlightedTextWrappedInsideWrapper(
text = replyEntity.content,
copyClickedText = true
)
userIconIv.display(
replyEntity.user.border,
replyEntity.user.icon,
@ -292,6 +288,7 @@ class RatingReplyAdapter(
badgeTv.visibility = View.GONE
}
val parent = replyEntity.parent
var contentCharSequence: CharSequence = replyEntity.content
if (parent != null) {
val prefix = "回复"
val colon = " "
@ -321,14 +318,17 @@ class RatingReplyAdapter(
R.color.text_title
).build()
contentTv.text = SpannableStringBuilder()
contentCharSequence = SpannableStringBuilder()
.append(prefixSpan)
.append(parentUserNameSpan)
.append(colonSpan)
.append(replyEntity.content)
} else {
contentTv.text = replyEntity.content
}
contentTv.setTextWithHighlightedTextWrappedInsideWrapper(
text = contentCharSequence,
copyClickedText = true
)
badgeIv.setOnClickListener {
DialogUtils.showViewBadgeDialog(mContext, replyEntity.user.badge, object : ConfirmListener {
override fun onConfirm() {