We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd0dd6 commit 3b12a24Copy full SHA for 3b12a24
maps-compose-utils/src/main/java/com/google/maps/android/compose/clustering/ClusterRenderer.kt
@@ -94,9 +94,17 @@ internal class ComposeUiClusterRenderer<T : ClusterItem>(
94
*/
95
private fun Cluster<T>.computeViewKeys(): Set<ViewKey<T>> {
96
return if (shouldRenderAsCluster(this)) {
97
- setOf(ViewKey.Cluster(this))
+ if (clusterContentState.value != null) {
98
+ setOf(ViewKey.Cluster(this))
99
+ } else {
100
+ emptySet()
101
+ }
102
} else {
- items.mapTo(mutableSetOf()) { ViewKey.Item(it) }
103
+ if (clusterItemContentState.value != null) {
104
+ items.mapTo(mutableSetOf()) { ViewKey.Item(it) }
105
106
107
108
}
109
110
0 commit comments