[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure CameraPositionState map reference clears when GoogleMap l… #109

Merged
merged 3 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Ensure CameraPositionState map reference clears when GoogleMap l…
…eaves composition.

Change-Id: Iccf615e1a468ea7fbddb652052cec51b5d98a763
  • Loading branch information
arriolac committed May 5, 2022
commit e8c5bd07c6ac3e5d9a0cd7860b588ff8d454f6f8
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ class GoogleMapViewTests {
assertTrue(mapLoaded)
}

@Test
fun testCameraPositionStateMapClears() {
// TODO(Complete)
// composeTestRule.setContent {
// }
// assertTrue(cameraPositionState.map)
}

private fun zoom(
shouldAnimate: Boolean,
zoomIn: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.google.android.gms.maps.model.Polyline
internal interface MapNode {
fun onAttached() {}
fun onRemoved() {}
fun onCleared() {}
}

private object MapNodeRoot : MapNode
Expand All @@ -43,6 +44,8 @@ internal class MapApplier(

override fun onClear() {
map.clear()
decorations.forEach { it.onCleared() }
decorations.clear()
}

override fun insertBottomUp(index: Int, instance: MapNode) {
Expand Down