Fixing missing call to SymbolManager.onDestroy()
This commit is contained in:
parent
72e2951c3e
commit
f44d8b0b20
|
@ -35,7 +35,7 @@ data class LocationSharingArgs(
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class LocationSharingActivity : VectorBaseActivity<ActivityLocationSharingBinding>() {
|
class LocationSharingActivity : VectorBaseActivity<ActivityLocationSharingBinding>() {
|
||||||
// TODO fix leak of mapTilerView
|
|
||||||
override fun getBinding() = ActivityLocationSharingBinding.inflate(layoutInflater)
|
override fun getBinding() = ActivityLocationSharingBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
override fun initUiAndData() {
|
override fun initUiAndData() {
|
||||||
|
|
|
@ -76,6 +76,12 @@ class MapTilerMapView @JvmOverloads constructor(
|
||||||
showLocationButton = typedArray.getBoolean(R.styleable.MapTilerMapView_showLocateButton, false)
|
showLocationButton = typedArray.getBoolean(R.styleable.MapTilerMapView_showLocateButton, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
mapRefs?.symbolManager?.onDestroy()
|
||||||
|
mapRefs = null
|
||||||
|
super.onDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For location fragments.
|
* For location fragments.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -113,6 +113,7 @@ class LiveLocationMapViewFragment @Inject constructor() : VectorBaseFragment<Fra
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
onSymbolClickListener?.let { symbolManager?.removeClickListener(it) }
|
onSymbolClickListener?.let { symbolManager?.removeClickListener(it) }
|
||||||
|
symbolManager?.onDestroy()
|
||||||
bottomSheetController.callback = null
|
bottomSheetController.callback = null
|
||||||
views.liveLocationBottomSheetRecyclerView.cleanup()
|
views.liveLocationBottomSheetRecyclerView.cleanup()
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
|
Loading…
Reference in New Issue