From c533cd021f5cd823e6ad173eeb9ae110397fdfbe Mon Sep 17 00:00:00 2001 From: "kehaoyuan@ghzhushou.com" Date: Fri, 28 Feb 2020 19:00:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=9B=9E=E7=AD=94/=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E9=98=B2=E6=8A=96?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qa/answer/CommunityAnswerItemViewHolder.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt index 22a4cb7bf1..c336d31af6 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt @@ -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) + } } } }