From 7c54b897ac0cd9b65577c13a6d28830ab8854c04 Mon Sep 17 00:00:00 2001 From: geeksville Date: Wed, 10 Jun 2020 17:12:57 -0700 Subject: [PATCH] oops - my fix for the native mapbox crash was looking at the wrong view --- app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt index a9790528b..5b1cde4f7 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/MapFragment.kt @@ -133,14 +133,14 @@ class MapFragment : ScreenFragment("Map"), Logging { var mapView: MapView? = null - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + override fun onViewCreated(viewIn: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) // We might not have a real mapview if running with analytics if ((requireContext().applicationContext as GeeksvilleApplication).isAnalyticsAllowed) { - val v = view.findViewById(R.id.mapView) - mapView = v - v.onCreate(savedInstanceState) + val vIn = viewIn.findViewById(R.id.mapView) + mapView = vIn + vIn.onCreate(savedInstanceState) mapView?.let { v -> // Each time the pane is shown start fetching new map info (we do this here instead of