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

Skip to content
Commit 8f119d2e authored by Catherine Liang's avatar Catherine Liang
Browse files

Fix selected option not updated after applying color (2/2)

The issue comes from the diffing utils that we use to compare 2
OptionItemViewModels and update the recycler view. In
OptionItemViewModel, the equality check is overridden to check that the
flow values are equal, and not whether the flows are the same instance,
but flow values of the old items could be updated to match new items,
causing no view update. This was done to fix the original grid picker's
selection animation, which was janky because options were applied and
reloaded mid-animation (b/273336388). This will no longer be an issue
in the new picker UI, which uses the preview and apply pattern.
Therefore create a new OptionItemViewModel2 without overriding the
equality check.

Flag: com.android.systemui.shared.new_customization_picker_ui
Test: manually verified & unit tests
Bug: 350718581
Change-Id: If892a3f1dc011e9e2a3fd4a1eff507abb1e4d94a
parent ee238365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment