From 65c6e578ebea8f14ef445ecc2817a93ac9a1d39f Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Wed, 3 Aug 2022 17:14:21 +0200 Subject: [PATCH] Moving setup of map in onViewCreated + moving reference assignment of MapView --- .../location/live/map/LiveLocationMapViewFragment.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt index a866d54a79..85095e7c9f 100644 --- a/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt +++ b/vector/src/main/java/im/vector/app/features/location/live/map/LiveLocationMapViewFragment.kt @@ -86,6 +86,7 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment - (mapFragment.view as? MapView)?.let(::listenMapLoadingError) + (mapFragment.view as? MapView)?.let { + mapView = it + listenMapLoadingError(it) + } lifecycleScope.launch { mapboxMap.setStyle(urlMapProvider.getMapUrl()) { style -> mapStyle = style @@ -148,7 +147,6 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment