[2.14.0]fix一天内的bag全部删除后还会显示当天日期Bug
This commit is contained in:
@@ -361,10 +361,9 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
val deleteBagInfo = iterator.next()
|
||||
if(deleteBagInfo.key == bagManager.keyReq){
|
||||
iterator.remove()
|
||||
// bagManagerEntity.bagsInfoResp.remove(deleteBagInfo)
|
||||
bagManagerList.remove(deleteBagInfo)
|
||||
//更新列表
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
// bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
if(bagManagerList.size>0){
|
||||
//继续执行删除命令
|
||||
bagManagerEntity.reqType = 4
|
||||
@@ -373,6 +372,30 @@ class BadCaseManagerView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
//遍历列表,如当天Bag全部删除,同时把日期标题也删除更新列表
|
||||
val titleIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
while(titleIterator.hasNext()){
|
||||
val titleBagInfo = titleIterator.next()
|
||||
if(titleBagInfo.itemType == 1){
|
||||
val bagIterator = bagManagerEntity.bagsInfoResp.iterator()
|
||||
var hasBag = false
|
||||
while(bagIterator.hasNext()){
|
||||
val bagBagInfo = bagIterator.next()
|
||||
if(bagBagInfo.itemType == 0){
|
||||
bagBagInfo.timestamp?.let {
|
||||
if(it.contains(titleBagInfo.timestamp.toString())){
|
||||
hasBag = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!hasBag){
|
||||
bagIterator.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新列表
|
||||
bagManagerListAdapter?.setData(bagManagerEntity.bagsInfoResp)
|
||||
}
|
||||
//修改bag附加信息
|
||||
else if(bagManager.reqType == 5){
|
||||
|
||||
Reference in New Issue
Block a user