参加0元购 优化+1
This commit is contained in:
parent
542420b17a
commit
edc968f004
|
|
@ -57,7 +57,7 @@ class ZeroBuyViewModel : ViewModel() {
|
|||
|
||||
respObj?.contentObj?.let {
|
||||
val itemId = respObj?.contentObj?.id
|
||||
if ((respObj.Code == 0 || respObj.Code == 10003) && itemId != null && itemId > 0 && !joinZeroBuyItemIds.contains(itemId)) {
|
||||
if ((respObj.Code == 0 || respObj.Code == 10003) && itemId != null && itemId > 0) {
|
||||
val mutableJoinedIdList = if(joinZeroBuyItemIds == null) mutableListOf<Int>() else joinZeroBuyItemIds.toMutableList()
|
||||
mutableJoinedIdList.add(itemId)
|
||||
SpUtil.instance().putList(SpUtil.KEY_ZEROBUY_JOINED_ACTIVITY_IDS, mutableJoinedIdList)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class ZeroItemAdapter(private val joinCallback: (itemId: Int)->Unit) : ListAdapt
|
|||
}
|
||||
|
||||
override fun areContentsTheSame(oldItem: ZeroBuyItem, newItem: ZeroBuyItem): Boolean {
|
||||
return oldItem == newItem
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue