Skip to content

Commit

Permalink
fix(close #537): fixed scope cancellation that leads to bug when inva…
Browse files Browse the repository at this point in the history
…lidating composable doesn't invalidate marker/cluster
  • Loading branch information
y9san9 committed Mar 21, 2024
1 parent 0599412 commit ef90653
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.google.maps.android.compose.MapsComposeExperimentalApi
import com.google.maps.android.compose.currentCameraPositionState
import com.google.maps.android.compose.rememberComposeUiViewRenderer
import com.google.maps.android.compose.rememberReattachClickListenersHandle
import kotlinx.coroutines.awaitCancellation
import kotlinx.coroutines.launch

/**
Expand Down Expand Up @@ -248,6 +249,7 @@ public fun <T : ClusterItem> rememberClusterRenderer(
clusterItemContentState,
)
clusterRendererState.value = renderer
awaitCancellation()
}
return clusterRendererState.value
}
Expand Down

0 comments on commit ef90653

Please sign in to comment.