aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2021-12-11 18:09:42 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2021-12-11 18:09:42 -0600
commitcd3c9d93053241b48051ca20d301e4768a576456 (patch)
tree6a1cedaed75b7edcf36217038470b66c1664f3fb /shared
parent04c2889895483f5925c90ed7a856d38391fcab45 (diff)
downloadetbsa-trackermap-mobile-cd3c9d93053241b48051ca20d301e4768a576456.tar.gz
etbsa-trackermap-mobile-cd3c9d93053241b48051ca20d301e4768a576456.tar.bz2
etbsa-trackermap-mobile-cd3c9d93053241b48051ca20d301e4768a576456.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')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt4
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) ||