From b911edb83cfcd4f02298cb08bc6ecb7375369943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E7=A5=A5=E4=BF=8A?= Date: Mon, 8 Apr 2024 14:16:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=82=B9=E8=B5=9E=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt index 633d32b2c5..5f43f49cfa 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt @@ -746,6 +746,8 @@ abstract class BaseCommentAdapter( val loginEntrance = if (isVoted) "帖子评论-取消点赞" else "帖子评论-点赞" binding.likeCountTv.context.ifLogin(loginEntrance) { if (isVoted) { + viewModel.unLike(comment) + } else { viewModel.like(comment) if (viewModel is ArticleDetailViewModel) { @@ -758,8 +760,6 @@ abstract class BaseCommentAdapter( comment.user.id ?: "", contentType, comment.id ?: "", bbsId, bbsType ) - } else { - viewModel.unLike(comment) } } }