Merge remote-tracking branch 'origin/dev-4.7.0' into dev-4.7.0

This commit is contained in:
juntao
2021-02-04 09:52:03 +08:00
2 changed files with 7 additions and 6 deletions

View File

@ -493,8 +493,8 @@ class AnswerDetailFragment : NormalFragment() {
private fun toggleComment(enable: Boolean, commentCount: Int) {
if (enable) {
mBinding.bottomController.bottomCommentIv.setImageResource(R.drawable.community_content_detail_comment_open)
mBinding.bottomController.bottomCommentTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_242529))
mBinding.bottomController.bottomCommentIv.setImageResource(R.drawable.ic_article_detail_comment_bottom_bar)
mBinding.bottomController.bottomCommentTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_666666))
mBinding.bottomController.bottomCommentTv.text = if (commentCount > 0) commentCount.toString() else "评论"
} else {
mBinding.bottomController.bottomCommentIv.setImageResource(R.drawable.community_content_detail_comment_close)
@ -918,7 +918,7 @@ class AnswerDetailFragment : NormalFragment() {
} else {
mBinding.bottomController.bottomStarIv.setImageResource(R.drawable.ic_article_detail_star_bottom_bar)
mBinding.bottomController.bottomStarTv.text = "收藏"
mBinding.bottomController.bottomStarTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_242529))
mBinding.bottomController.bottomStarTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_666666))
}
}
@ -1125,13 +1125,13 @@ class AnswerDetailFragment : NormalFragment() {
private fun updateLikeView(alreadyVoted: Boolean, voteCount: Int) {
// mBinding.bottomController.bottomLikeTv.text = "赞同 ${NumberUtils.transSimpleCount(voteCount)}"
if (alreadyVoted) {
mBinding.bottomController.bottomLikeIv.setImageResource(R.drawable.community_content_detail_vote_select)
mBinding.bottomController.bottomLikeIv.setImageResource(R.drawable.ic_article_detail_liked_bottom_bar)
mBinding.bottomController.bottomLikeTv.text = NumberUtils.transSimpleCount(voteCount)
mBinding.bottomController.bottomLikeTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme_font))
} else {
mBinding.bottomController.bottomLikeIv.setImageResource(R.drawable.community_content_detail_vote_unselect)
mBinding.bottomController.bottomLikeIv.setImageResource(R.drawable.ic_article_detail_like_bottom_bar)
mBinding.bottomController.bottomLikeTv.text = "赞同"
mBinding.bottomController.bottomLikeTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_242529))
mBinding.bottomController.bottomLikeTv.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_666666))
}
}