|
@@ -432,13 +432,18 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
|
|
|
|
|
|
if (isChecked) {
|
|
|
isChecked = false
|
|
|
-
|
|
|
checkedItemId.remove(id)
|
|
|
|
|
|
+ showItemList.clear()
|
|
|
+
|
|
|
for ((i, item) in carTouristGuides.withIndex()) {
|
|
|
if (item.sId == id) {
|
|
|
totalPrice -= carTouristGuides[i].price * carTouristGuides[i].count
|
|
|
}
|
|
|
+
|
|
|
+ if (checkedItemId.contains(item.sId)) {
|
|
|
+ showItemList.add(item)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
showItemList.removeIf { item ->
|
|
@@ -449,12 +454,14 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
|
|
|
isChecked = true
|
|
|
checkedItemId.add(id)
|
|
|
|
|
|
+ showItemList.clear()
|
|
|
+
|
|
|
for ((i, item) in carTouristGuides.withIndex()) {
|
|
|
if (item.sId == id) {
|
|
|
totalPrice += carTouristGuides[i].price * carTouristGuides[i].count
|
|
|
}
|
|
|
|
|
|
- if (checkedItemId.contains(id)) {
|
|
|
+ if (checkedItemId.contains(item.sId)) {
|
|
|
showItemList.add(item)
|
|
|
}
|
|
|
}
|
|
@@ -720,11 +727,11 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
|
|
|
}
|
|
|
|
|
|
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
|
|
- return oldList[oldItemPosition] == newList[newItemPosition]
|
|
|
+ return oldList[oldItemPosition].id == newList[newItemPosition].id
|
|
|
}
|
|
|
|
|
|
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
|
|
- return oldList[oldItemPosition] == newList[newItemPosition]
|
|
|
+ return oldList[oldItemPosition].id == newList[newItemPosition].id
|
|
|
}
|
|
|
|
|
|
}
|