aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2022-01-03 15:19:51 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2022-01-03 15:19:51 -0600
commit28ce12043342ec830437ef87169ebee4168e99c4 (patch)
tree5ad5bdf1a0101d4f82c7e99f14724012f2dcc98a /androidApp/src/main/java
parentf6171f524e64966355fa64644a46939a35beb412 (diff)
downloadetbsa-trackermap-mobile-28ce12043342ec830437ef87169ebee4168e99c4.tar.gz
etbsa-trackermap-mobile-28ce12043342ec830437ef87169ebee4168e99c4.tar.bz2
etbsa-trackermap-mobile-28ce12043342ec830437ef87169ebee4168e99c4.zip
Extra UI change to test some functionality
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt
index 7212a23..4a0fab2 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt
@@ -55,12 +55,14 @@ class UnitMapFragment : Fragment() {
Log.d("UnitMapFragment", "Selected Unit: $selectedUnit")
binding.mapUnitCard.visibility = if (selectedUnit == null) View.GONE else View.VISIBLE
- selectedUnit?.position?.let { position ->
- if (position.latitude == null || position.longitude == null) {
+
+ selectedUnit?.let { unit ->
+ if (unit.position == null || unit.position!!.latitude == null || unit.position!!.longitude == null) {
return@let
}
- unitsMapFragment.focusOn(position.latitude!!, position.longitude!!)
+ binding.unitInfoTest.text = unit.device.contact
+ unitsMapFragment.focusOn(unit.position!!.latitude!!, unit.position!!.longitude!!)
}
}
}