aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-18 00:40:50 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-18 00:40:50 -0600
commite1f3bee440c053b3d3591089a7cd08579de4f0d5 (patch)
tree2fd04c87d60c0e464968ad37bffca1b77da68841 /androidApp/src/main/java/mx/trackermap
parent5b6ad3dd226c28475a657638b6d883c72aca2255 (diff)
parent9f42e2777fc2dc2b6231f559fd544247f9f2c334 (diff)
downloadetbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.tar.gz
etbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.tar.bz2
etbsa-trackermap-mobile-e1f3bee440c053b3d3591089a7cd08579de4f0d5.zip
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt3
1 files changed, 3 insertions, 0 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 e64afd3..9718262 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
@@ -130,6 +130,9 @@ class UnitMapFragment : Fragment() {
Log.d("UnitMapFragment", "Loading layer!")
mapFragment.updateLayer(type)
unitsViewModel.selectedUnit.value?.let {
+ if (it.position == null || it.position?.latitude == null || it.position?.longitude == null) {
+ return@let
+ }
unitsViewModel.moveCamera(
UnitsViewModel.Camera(
point = Point2d(