修改视频评论作者标记显示错误
This commit is contained in:
@ -63,6 +63,12 @@ class StairsCommentReplyAdapter(context: Context, val mViewModel: NewCommentView
|
||||
|
||||
holder.binding.sdvUserBadge.visibility = View.GONE
|
||||
holder.binding.commentUserName.textSize = 12f
|
||||
|
||||
if (commentEntity.reply == 0) {
|
||||
val params = holder.binding.commentUsernameAndTime.layoutParams as RelativeLayout.LayoutParams
|
||||
params.bottomMargin = 0
|
||||
holder.binding.commentUsernameAndTime.layoutParams = params
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -57,11 +57,14 @@ class StairsCommentViewHolder(val binding: StairsCommentItemBinding, val isReply
|
||||
binding.commentAuthor.visibility = View.GONE
|
||||
}
|
||||
if (parentUser != null && !TextUtils.isEmpty(parentUser.name)) {
|
||||
val name = "${entity.user.name} 回复 ${parentUser.name}"
|
||||
binding.commentUserName.text = SpanBuilder(name).color((entity.user.name?.length
|
||||
?: 0) + 1, (entity.user.name?.length ?: 0) + 3, R.color.text_666666).build()
|
||||
binding.commentUserName.text = entity.user.name
|
||||
binding.replyTv.visibility = View.VISIBLE
|
||||
binding.commentReplyUserName.visibility = View.VISIBLE
|
||||
binding.commentReplyUserName.text = parentUser.name
|
||||
} else {
|
||||
binding.commentUserName.text = userInfo.name
|
||||
binding.replyTv.visibility = View.GONE
|
||||
binding.commentReplyUserName.visibility = View.GONE
|
||||
}
|
||||
if (userInfo.auth != null) {
|
||||
display(binding.commentUserBadge, userInfo.auth!!.icon)
|
||||
@ -76,11 +79,14 @@ class StairsCommentViewHolder(val binding: StairsCommentItemBinding, val isReply
|
||||
binding.commentAuthor.visibility = View.GONE
|
||||
}
|
||||
if (parentUser != null && !TextUtils.isEmpty(parentUser.name)) {
|
||||
val name = "${entity.user.name} 回复 ${parentUser.name}"
|
||||
binding.commentUserName.text = SpanBuilder(name).color((entity.user.name?.length
|
||||
?: 0) + 1, (entity.user.name?.length ?: 0) + 3, R.color.text_666666).build()
|
||||
binding.commentUserName.text = entity.user.name
|
||||
binding.replyTv.visibility = View.VISIBLE
|
||||
binding.commentReplyUserName.visibility = View.VISIBLE
|
||||
binding.commentReplyUserName.text = parentUser.name
|
||||
} else {
|
||||
binding.commentUserName.text = entity.user.name
|
||||
binding.replyTv.visibility = View.GONE
|
||||
binding.commentReplyUserName.visibility = View.GONE
|
||||
}
|
||||
if (entity.user.auth != null) {
|
||||
display(binding.commentUserBadge, entity.user.auth!!.icon)
|
||||
|
||||
Reference in New Issue
Block a user