参加0元购 优化+1

This commit is contained in:
renhaoting 2025-12-09 17:31:02 +08:00
parent 542420b17a
commit edc968f004
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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
}
}
}