We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62f4e43 commit bce2c9dCopy full SHA for bce2c9d
1 file changed
maps-compose-utils/src/main/java/com/google/maps/android/compose/clustering/ClusterRenderer.kt
@@ -82,9 +82,17 @@ internal class ComposeUiClusterRenderer<T : ClusterItem>(
82
*/
83
private fun Cluster<T>.computeViewKeys(): Set<ViewKey<T>> {
84
return if (shouldRenderAsCluster(this)) {
85
- setOf(ViewKey.Cluster(this))
+ if (clusterContentState.value != null) {
86
+ setOf(ViewKey.Cluster(this))
87
+ } else {
88
+ emptySet()
89
+ }
90
} else {
- items.mapTo(mutableSetOf()) { ViewKey.Item(it) }
91
+ if (clusterItemContentState.value != null) {
92
+ items.mapTo(mutableSetOf()) { ViewKey.Item(it) }
93
94
95
96
}
97
98
0 commit comments