精简代码
This commit is contained in:
parent
577527472a
commit
78c57b41ef
|
|
@ -106,13 +106,14 @@ class WinRecordsActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabS
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateUIs(data: ZeroBuyResp) {
|
private fun updateUIs(data: ZeroBuyResp) {
|
||||||
if (data.finished_purchases.isNullOrEmpty()) {
|
val dataList = data.finished_purchases
|
||||||
|
if (dataList.isNullOrEmpty()) {
|
||||||
binding.tvNoDataHint.isVisible = true
|
binding.tvNoDataHint.isVisible = true
|
||||||
binding.recyclerView.isVisible = false
|
binding.recyclerView.isVisible = false
|
||||||
} else {
|
} else {
|
||||||
binding.tvNoDataHint.isVisible = false
|
binding.tvNoDataHint.isVisible = false
|
||||||
binding.recyclerView.isVisible = true
|
binding.recyclerView.isVisible = true
|
||||||
mAdapter.submitList(data.finished_purchases)
|
mAdapter.submitList(dataList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class ZeroRecordAdapter(private val onWithdrawCallback: (ZeroBuyItem)-> Unit) :
|
||||||
|
|
||||||
if (isWinItem) {
|
if (isWinItem) {
|
||||||
val withdrawBean = ZeroManager.instance().getZeroWithdrawItem(item)
|
val withdrawBean = ZeroManager.instance().getZeroWithdrawItem(item)
|
||||||
when (withdrawBean.withdrawState) {
|
when (withdrawBean?.withdrawState) {
|
||||||
TRANSACTION_STATE_UNSTART -> {
|
TRANSACTION_STATE_UNSTART -> {
|
||||||
llRightWin.isClickable = true
|
llRightWin.isClickable = true
|
||||||
tvWinRightBottom.text = SpannableString(ResUtil.getString(R.string.zero_win_state_withdrarw_unstart)).apply {
|
tvWinRightBottom.text = SpannableString(ResUtil.getString(R.string.zero_win_state_withdrarw_unstart)).apply {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue