Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98610cea authored by Coco Duan's avatar Coco Duan
Browse files

Fix random widget getting displayed after adding a widget

Once the lazygrid gets big enough to overscroll, adding a widget
ends up rendering a random view of another widget in the grid.
A tentative fix is to remove the `onReset` to always recompose
the view, though this makes the performance worse.

Bug: b/311319994
Test: manual
Flag: ACONFIG com.android.systemui.communal_hub DEVELOPMENT
Change-Id: Ie39276e6ee4ab0d9dc8a3077c3201a529e0df4f9
parent 831a9637
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -146,8 +146,6 @@ private fun WidgetContent(
                    .createView(context, model.appWidgetId, model.providerInfo)
                    .apply { updateAppWidgetSize(Bundle.EMPTY, listOf(size)) }
            },
            // For reusing composition in lazy lists.
            onReset = {}
        )
    }
}