From cd3c9d93053241b48051ca20d301e4768a576456 Mon Sep 17 00:00:00 2001 From: Isidro Henoch Date: Sat, 11 Dec 2021 18:09:42 -0600 Subject: Adds the search behaviour - Updates units_activity to include a search input - Adds the search functionality to the Units VM - Adds the required events to the Units Activity to perform the search --- .../kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/src/commonMain/kotlin/mx/trackermap') 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 9c11b79..29c84f4 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt @@ -30,7 +30,7 @@ class UnitsController( } } - suspend fun fetchUnits() { + private suspend fun fetchUnits() { val devices = devicesApi.devicesGet() val positions = positionsApi.positionsGet() val positionsMap: MutableMap = mutableMapOf() @@ -51,7 +51,7 @@ class UnitsController( queryFlow.value = query } - suspend fun setupFlows() { + private suspend fun setupFlows() { unitsFlow.combine(queryFlow) { units, query -> units.filter { unit -> unit.device.name.contains(query) || -- cgit v1.2.3