feat: reply count in story

This commit is contained in:
rebelonion 2024-05-13 06:38:12 -05:00
parent 001c384d11
commit b0b51c4347
2 changed files with 38 additions and 8 deletions

View file

@ -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 {