社区回答/文章列表增加防抖操作
This commit is contained in:
@ -62,9 +62,11 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
}
|
||||
|
||||
binding.voteButton.setOnClickListener {
|
||||
CheckLoginUtils.checkLogin(itemView.context, entrance) {
|
||||
if (!binding.voteIcon.isChecked) voteAnswer(entity)
|
||||
else cancelAnswerVote(entity)
|
||||
debounceActionWithInterval(R.id.container_like, 1000) {
|
||||
CheckLoginUtils.checkLogin(itemView.context, entrance) {
|
||||
if (!binding.voteIcon.isChecked) voteAnswer(entity)
|
||||
else cancelAnswerVote(entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -82,9 +84,11 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
}
|
||||
|
||||
binding.voteButton.setOnClickListener {
|
||||
CheckLoginUtils.checkLogin(itemView.context, entrance) {
|
||||
if (!binding.voteIcon.isChecked) voteArticle(entity)
|
||||
else cancelArticleVote(entity)
|
||||
debounceActionWithInterval(R.id.container_like, 1000) {
|
||||
CheckLoginUtils.checkLogin(itemView.context, entrance) {
|
||||
if (!binding.voteIcon.isChecked) voteArticle(entity)
|
||||
else cancelArticleVote(entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user