diff options
author | Isidro Henoch <imhenoch@protonmail.com> | 2021-12-11 18:09:42 -0600 |
---|---|---|
committer | Isidro Henoch <imhenoch@protonmail.com> | 2021-12-11 18:09:42 -0600 |
commit | 774f8876d6c61a8dd434ed67f1ee5bc801ee7eb5 (patch) | |
tree | 6a1cedaed75b7edcf36217038470b66c1664f3fb /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt | |
parent | fabb451dbdbd28b0f09b91ee193d6d62ed027df7 (diff) | |
download | etbsa-trackermap-mobile-774f8876d6c61a8dd434ed67f1ee5bc801ee7eb5.tar.gz etbsa-trackermap-mobile-774f8876d6c61a8dd434ed67f1ee5bc801ee7eb5.tar.bz2 etbsa-trackermap-mobile-774f8876d6c61a8dd434ed67f1ee5bc801ee7eb5.zip |
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
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt | 4 |
1 files changed, 2 insertions, 2 deletions
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<Int, Position> = 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) || |