diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-16 02:52:28 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-16 02:52:28 -0600 |
commit | 08b3e987e7cfa09bf16b2475d3296822d5c6353d (patch) | |
tree | c17a93328f0599e901e794cd2b718c36af5bc35e /shared | |
parent | 066298eda3c5ebe40b74ae67894417d72ff428a9 (diff) | |
parent | 69a4d373262ed9cb83db41df4d5465612ed402c3 (diff) | |
download | etbsa-trackermap-mobile-08b3e987e7cfa09bf16b2475d3296822d5c6353d.tar.gz etbsa-trackermap-mobile-08b3e987e7cfa09bf16b2475d3296822d5c6353d.tar.bz2 etbsa-trackermap-mobile-08b3e987e7cfa09bf16b2475d3296822d5c6353d.zip |
Merge remote-tracking branch 'origin/main'
# Conflicts:
# androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt
# androidApp/src/main/res/layout/unit_item.xml
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt | 4 |
1 files changed, 4 insertions, 0 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 29c84f4..db6d9b3 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt @@ -51,6 +51,10 @@ class UnitsController( queryFlow.value = query } + fun getUnit(deviceId: Int): UnitInformation? { + return unitsFlow.value.firstOrNull { it.device.id == deviceId } + } + private suspend fun setupFlows() { unitsFlow.combine(queryFlow) { units, query -> units.filter { unit -> |