From 485dd17f88d8cb45e79b8ee48c678f58b6d0d33d Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Mon, 19 Jun 2023 13:55:42 +0200 Subject: [PATCH] refs #4678 --- .../view/feature/delivery/fragments/LoadUnloadFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt index 6a64e0dd..f0acd54d 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt @@ -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 // myList = list as MutableList } if (addressFk != 0) { myList = myList.filter { it.addressFk == addressFk } as MutableList + }else{ + myList.filter{ + it.routeFk == route + } } adapter = ExpeditionLoadUnloadAdapter(myList) binding.expeditionloadunloadRecyclerview.adapter = adapter