From 142a64d26171bf2b8b8efa46e2cbabd70b9bbd44 Mon Sep 17 00:00:00 2001 From: "kehaoyuan@ghzhushou.com" Date: Fri, 28 Feb 2020 10:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=BC=A0=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E4=BF=AE=E6=94=B9=E5=B0=81=E9=9D=A2=E5=9B=BE=E9=97=AA?= =?UTF-8?q?=E9=80=80=E9=97=AE=E9=A2=98=20=E5=9B=9E=E7=AD=94/=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=88=97=E8=A1=A8=E7=82=B9=E8=B5=9E=E6=97=B6=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt | 8 ++++++-- .../qa/questions/CommunityQuestionViewHolder.kt | 5 ++++- .../com/zhihu/matisse/internal/entity/SelectionSpec.java | 1 + 3 files changed, 11 insertions(+), 3 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 e0e7acc74e..0c0e07b9e0 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 @@ -49,7 +49,9 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B } binding.voteButton.setOnClickListener { - if (!binding.voteIcon.isChecked) voteAnswer(entity) + CheckLoginUtils.checkLogin(itemView.context, entrance) { + if (!binding.voteIcon.isChecked) voteAnswer(entity) + } } } @@ -66,7 +68,9 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B } binding.voteButton.setOnClickListener { - if (!binding.voteIcon.isChecked) voteArticle(entity) + CheckLoginUtils.checkLogin(itemView.context, entrance) { + if (!binding.voteIcon.isChecked) voteArticle(entity) + } } } diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/CommunityQuestionViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/CommunityQuestionViewHolder.kt index 132b4a3fd3..80893c1c74 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/CommunityQuestionViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/CommunityQuestionViewHolder.kt @@ -1,6 +1,7 @@ package com.gh.gamecenter.qa.questions import com.gh.base.BaseRecyclerViewHolder +import com.gh.common.util.CheckLoginUtils import com.gh.common.util.NewsUtils import com.gh.common.util.NumberUtils import com.gh.gamecenter.databinding.CommunityQuestionItemBinding @@ -30,7 +31,9 @@ class CommunityQuestionViewHolder(val binding: CommunityQuestionItemBinding) : B binding.answerCount.setOnClickListener { if (questions.answerCount > 0) { - itemView.context.startActivity(QuestionsDetailActivity.getIntent(itemView.context, questions.id, entrance, path)) + CheckLoginUtils.checkLogin(itemView.context , entrance) { + itemView.context.startActivity(QuestionsDetailActivity.getIntent(itemView.context, questions.id, entrance, path)) + } } else { val communityName = if (questions.communityName.isNullOrEmpty()) UserManager.getInstance().community.name else questions.communityName diff --git a/libraries/Matisse/src/main/java/com/zhihu/matisse/internal/entity/SelectionSpec.java b/libraries/Matisse/src/main/java/com/zhihu/matisse/internal/entity/SelectionSpec.java index 0efe660b44..a69ab20004 100644 --- a/libraries/Matisse/src/main/java/com/zhihu/matisse/internal/entity/SelectionSpec.java +++ b/libraries/Matisse/src/main/java/com/zhihu/matisse/internal/entity/SelectionSpec.java @@ -93,6 +93,7 @@ public final class SelectionSpec { hasInited = true; originalable = false; originalMaxSize = Integer.MAX_VALUE; + singleChoiceMode = false; } public boolean singleSelectionModeEnabled() {