fix: 修复贴子点赞数量显示错误
This commit is contained in:
parent
cac11a7831
commit
5f946b32f3
|
|
@ -100,6 +100,10 @@ class ThreadActivity : BaseActivity(), View.OnClickListener, IThreadMenuFragment
|
||||||
invalidateAgreeStatus()
|
invalidateAgreeStatus()
|
||||||
}
|
}
|
||||||
private var agreeNum = 0
|
private var agreeNum = 0
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
agreeNumTextView.text = "$value"
|
||||||
|
}
|
||||||
private var page = 0
|
private var page = 0
|
||||||
private var totalPage = 0
|
private var totalPage = 0
|
||||||
|
|
||||||
|
|
@ -342,7 +346,6 @@ class ThreadActivity : BaseActivity(), View.OnClickListener, IThreadMenuFragment
|
||||||
title = threadContentBean.thread?.title
|
title = threadContentBean.thread?.title
|
||||||
collect = threadContentBean.thread != null && "0" != threadContentBean.thread.collectStatus
|
collect = threadContentBean.thread != null && "0" != threadContentBean.thread.collectStatus
|
||||||
agree = threadContentBean.thread?.agree != null && "0" != threadContentBean.thread.agree.hasAgree
|
agree = threadContentBean.thread?.agree != null && "0" != threadContentBean.thread.agree.hasAgree
|
||||||
agreeNumTextView.text = threadContentBean.thread?.agreeNum
|
|
||||||
agreeNum = Integer.valueOf(if (TextUtils.isEmpty(threadContentBean.thread?.agreeNum)) "0" else threadContentBean.thread?.agreeNum!!)
|
agreeNum = Integer.valueOf(if (TextUtils.isEmpty(threadContentBean.thread?.agreeNum)) "0" else threadContentBean.thread?.agreeNum!!)
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
hasMore()
|
hasMore()
|
||||||
|
|
@ -746,11 +749,6 @@ class ThreadActivity : BaseActivity(), View.OnClickListener, IThreadMenuFragment
|
||||||
agreeNumTextView.setTextColor(color)
|
agreeNumTextView.setTextColor(color)
|
||||||
super.onAnimationEnd(animation)
|
super.onAnimationEnd(animation)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAnimationStart(animation: Animator) {
|
|
||||||
agreeNumTextView.text = agreeNum.toString()
|
|
||||||
super.onAnimationStart(animation)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
agreeBtnAnimator.addListener(object : AnimatorListenerAdapter() {
|
agreeBtnAnimator.addListener(object : AnimatorListenerAdapter() {
|
||||||
override fun onAnimationEnd(animation: Animator) {
|
override fun onAnimationEnd(animation: Animator) {
|
||||||
|
|
@ -772,11 +770,6 @@ class ThreadActivity : BaseActivity(), View.OnClickListener, IThreadMenuFragment
|
||||||
agreeNumTextView.setTextColor(ThemeUtil.getTextColor(this@ThreadActivity))
|
agreeNumTextView.setTextColor(ThemeUtil.getTextColor(this@ThreadActivity))
|
||||||
super.onAnimationEnd(animation)
|
super.onAnimationEnd(animation)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAnimationStart(animation: Animator) {
|
|
||||||
agreeNumTextView.text = agreeNum.toString()
|
|
||||||
super.onAnimationStart(animation)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
agreeBtnAnimator.addListener(object : AnimatorListenerAdapter() {
|
agreeBtnAnimator.addListener(object : AnimatorListenerAdapter() {
|
||||||
override fun onAnimationEnd(animation: Animator) {
|
override fun onAnimationEnd(animation: Animator) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue