feat: reply count in story
This commit is contained in:
parent
001c384d11
commit
b0b51c4347
2 changed files with 38 additions and 8 deletions
|
@ -443,9 +443,15 @@ class Stories @JvmOverloads constructor(
|
|||
}
|
||||
val likeColor = ContextCompat.getColor(context, R.color.yt_red)
|
||||
val notLikeColor = ContextCompat.getColor(context, R.color.bg_opp)
|
||||
binding.activityReplies.setOnClickListener {
|
||||
binding.activityRepliesContainer.setOnClickListener {
|
||||
RepliesBottomDialog.newInstance(story.id).show(activity.supportFragmentManager, "replies")
|
||||
}
|
||||
if (story.replyCount > 0) {
|
||||
binding.replyCount.text = story.replyCount.toString()
|
||||
binding.replyCount.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.replyCount.visibility = View.GONE
|
||||
}
|
||||
binding.activityLikeCount.text = story.likeCount.toString()
|
||||
binding.activityLike.setColorFilter(if (story.isLiked == true) likeColor else notLikeColor)
|
||||
binding.activityLikeContainer.setOnClickListener {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue