From 1c4c5128fac5b1b6c8d9de29bd1ccf6262c7894b Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 30 Dec 2021 22:05:55 -0600 Subject: - ViewModel LiveData no longer externally mutable. - Observers in fragments now owned by viewLifecycleOwner. - Disabled center animation on MapFragment startup - Search filter now triggered automatically. - Case insensitive filter logic. --- .../kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared') diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt index db6d9b3..576ca0e 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt @@ -58,9 +58,9 @@ class UnitsController( private suspend fun setupFlows() { unitsFlow.combine(queryFlow) { units, query -> units.filter { unit -> - unit.device.name.contains(query) || - unit.device.contact?.contains(query) == true || - unit.position?.address?.contains(query) == true + unit.device.name.contains(query, true) || + unit.device.contact?.contains(query, true) == true || + unit.position?.address?.contains(query, true) == true } }.collect { units -> this.displayedUnitsFlow.value = units -- cgit v1.2.3