This commit is contained in:
Sergio De la torre 2023-06-19 13:55:42 +02:00
parent 5bdf4ab290
commit 485dd17f88
1 changed files with 5 additions and 1 deletions

View File

@ -296,13 +296,17 @@ class LoadUnloadFragment(
lifecycleScope.launch {
withContext(Dispatchers.IO) {
db.expedicionDao().insert(list.filter { it.routeFk == route }
.filter { it.addressFk == addressFk })
)
myList = db.expedicionDao().getAll(route) as MutableList<ExpeditionInfoLoadUnload>
// myList = list as MutableList<ExpeditionInfoLoadUnload>
}
if (addressFk != 0) {
myList =
myList.filter { it.addressFk == addressFk } as MutableList<ExpeditionInfoLoadUnload>
}else{
myList.filter{
it.routeFk == route
}
}
adapter = ExpeditionLoadUnloadAdapter(myList)
binding.expeditionloadunloadRecyclerview.adapter = adapter