Skip to content

Commit 6bc3884

Browse files
authored
Fix incorrect coroutine scope (#6398)
1 parent 7e142c2 commit 6bc3884

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libnavui-androidauto/src/main/java/com/mapbox/androidauto/car/placeslistonmap/PlacesListOnMapManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class PlacesListOnMapManager(
8585
styleLoadedListener = null
8686
MapboxNavigationApp.unregisterObserver(navigationObserver)
8787
carMapSurface = null
88+
coroutineScope?.cancel()
89+
coroutineScope = null
8890
}
8991

9092
private fun onAttached(mapboxNavigation: MapboxNavigation) {
@@ -99,8 +101,6 @@ class PlacesListOnMapManager(
99101

100102
private fun onDetached() {
101103
placesListItemMapper = null
102-
coroutineScope?.cancel()
103-
coroutineScope = null
104104
}
105105

106106
private fun loadPlaceRecords() {

0 commit comments

Comments
 (0)