Fixing after rebase

This commit is contained in:
Maxime NATUREL 2022-08-03 09:31:52 +02:00
parent ec5f874a81
commit 72377c9e7e
2 changed files with 6 additions and 10 deletions

View file

@ -109,6 +109,10 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment<Fra
} }
override fun onDestroyView() { override fun onDestroyView() {
onSymbolClickListener?.let { symbolManager?.removeClickListener(it) }
symbolManager?.onDestroy()
bottomSheetController.callback = null
views.liveLocationBottomSheetRecyclerView.cleanup()
mapLoadingErrorListener?.let { mapView?.removeOnDidFailLoadingMapListener(it) } mapLoadingErrorListener?.let { mapView?.removeOnDidFailLoadingMapListener(it) }
mapLoadingErrorListener = null mapLoadingErrorListener = null
mapView = null mapView = null
@ -120,14 +124,6 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment<Fra
setupMap() setupMap()
} }
override fun onDestroyView() {
onSymbolClickListener?.let { symbolManager?.removeClickListener(it) }
symbolManager?.onDestroy()
bottomSheetController.callback = null
views.liveLocationBottomSheetRecyclerView.cleanup()
super.onDestroyView()
}
private fun setupMap() { private fun setupMap() {
val mapFragment = getOrCreateSupportMapFragment() val mapFragment = getOrCreateSupportMapFragment()
mapFragment.getMapAsync { mapboxMap -> mapFragment.getMapAsync { mapboxMap ->
@ -154,7 +150,7 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment<Fra
private fun listenMapLoadingError(mapView: MapView) { private fun listenMapLoadingError(mapView: MapView) {
this.mapView = mapView this.mapView = mapView
mapLoadingErrorListener = MapView.OnDidFailLoadingMapListener { mapLoadingErrorListener = MapView.OnDidFailLoadingMapListener {
viewModel.handle(LocationLiveMapAction.ShowMapLoadingError) viewModel.handle(LiveLocationMapAction.ShowMapLoadingError)
}.also { mapView.addOnDidFailLoadingMapListener(it) } }.also { mapView.addOnDidFailLoadingMapListener(it) }
} }

View file

@ -34,7 +34,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/locationLiveRunningBanner" app:layout_constraintBottom_toTopOf="@id/liveLocationRunningBanner"
app:layout_constraintEnd_toEndOf="@id/staticMapImageView" app:layout_constraintEnd_toEndOf="@id/staticMapImageView"
app:layout_constraintStart_toStartOf="@id/staticMapImageView" app:layout_constraintStart_toStartOf="@id/staticMapImageView"
app:layout_constraintTop_toTopOf="@id/staticMapImageView" app:layout_constraintTop_toTopOf="@id/staticMapImageView"