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

Skip to content
Commit d97aab04 authored by Ned Burns's avatar Ned Burns
Browse files

Revamp how changes are tracked in ShadeListBuilder

In general, we want to log whenever something changes between runs of
the ShadeListBuilder: when a notif is added, when a notif changes
sections, when it gets promoted to top-level, etc.

Knowing that something has changed (and how it has changed) is not
as easy to detect as it once was: a notif might be added early in the
pipeline but removed later on, resulting in no real change. A notif
might have a section assigned to it but have it set back to null
because its associated group gets destroyed later on. And so on.

To better track these changes, this CL packages up all of the "list
state" that we care about (parent, filter, section, etc) into a simple
object, ListAttachState. Every ListEntry has two attach states: the
current one and the previous one. Whenever we finish a run of the list
builder, we iterate over every ListEntry and check to see if its attach
state now differs from its previous attach state. If it does, we log the
differences.

Test: atest, manual
Bug: 112656837
Change-Id: I9f44ed05a455ebac2706c18bc1718a9697e805ce
parent 0460375f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment