修改禅道问题65
This commit is contained in:
@ -185,7 +185,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH
|
||||
entity.me.isAnswerVoted = true
|
||||
EnergyTaskHelper.postEnergyTask("vote_answer", entity.id)
|
||||
}
|
||||
Utils.toast(itemView.context, "已赞同")
|
||||
ToastUtils.showToast("已赞同")
|
||||
}
|
||||
|
||||
override fun onFailure(e: HttpException?) {
|
||||
@ -288,7 +288,7 @@ open class BaseAnswerOrArticleItemViewHolder(itemView: View) : BaseRecyclerViewH
|
||||
.subscribe(object : Response<VoteEntity>() {
|
||||
override fun onResponse(response: VoteEntity?) {
|
||||
entity.me.isCommunityArticleVote = true
|
||||
Utils.toast(itemView.context, "已赞同")
|
||||
ToastUtils.showToast("已赞同")
|
||||
EnergyTaskHelper.postEnergyTask("vote_community_article", entity.id)
|
||||
}
|
||||
|
||||
|
||||
@ -351,10 +351,10 @@ class AnswerDetailFragment : NormalFragment() {
|
||||
|
||||
if (apiResponse.data != null) {
|
||||
if (answerDetail.me.isAnswerVoted) {
|
||||
toast("已赞同")
|
||||
ToastUtils.showToast("已赞同")
|
||||
updateDislikeView(false)
|
||||
} else {
|
||||
toast("取消赞同")
|
||||
ToastUtils.showToast("取消赞同")
|
||||
}
|
||||
|
||||
updateLikeView(answerDetail.me.isAnswerVoted, answerDetail.vote)
|
||||
|
||||
@ -280,10 +280,10 @@ class ArticleDetailFragment : BaseArticleDetailCommentFragment<CommentItemData,
|
||||
|
||||
mViewModel.like.observeNonNull(this) {
|
||||
if (mViewModel.detailEntity!!.me.isCommunityArticleVote) {
|
||||
toast("已赞同")
|
||||
ToastUtils.showToast("已赞同")
|
||||
mAdapter?.articleDetailVH?.updateDislikeView(false)
|
||||
} else {
|
||||
toast("取消赞同")
|
||||
ToastUtils.showToast("取消赞同")
|
||||
}
|
||||
updateLikeView(mViewModel.detailEntity!!.me.isCommunityArticleVote, mViewModel.detailEntity!!.count.vote)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user