diff options
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt index 2a9cf0fdc507..d1072aa1755e 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt @@ -178,6 +178,7 @@ private fun CommunalHubLazyGrid( items( count = list.size, key = { index -> list[index].key }, + contentType = { index -> list[index].key }, span = { index -> GridItemSpan(list[index].size.span) }, ) { index -> val cardModifier = Modifier.width(Dimensions.CardWidth) @@ -333,6 +334,8 @@ private fun WidgetContent( .createView(context, model.appWidgetId, model.providerInfo) .apply { updateAppWidgetSize(Bundle.EMPTY, listOf(size)) } }, + // For reusing composition in lazy lists. + onReset = {}, ) } } @@ -348,7 +351,7 @@ private fun SmartspaceContent( FrameLayout(context).apply { addView(model.remoteViews.apply(context, this)) } }, // For reusing composition in lazy lists. - onReset = {} + onReset = {}, ) } |