Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)

Ui.Diff

Description

Diff two states to produce a list of Updates, which must be sent to the UI to make it display the second state.

This is unpleasantly complicated and subtle. I wish I knew a better way!

Synopsis

# Documentation

Figure out updates needed to turn st1 into st2.

This diff is meant to determine score damage for the block, which determines what will have to be rederived, if anything.

This is repeating some work done in diff, but is fundamentally different because it cares about nonvisible changes, e.g. track title change on a block without a view.

Diff the events on one track. This will only emit track damage, and won't emit anything if the track title changed, or was created or deleted. Those diffs should be picked up by the main diff.

This is like derive_diff, but it only needs to return a Bool. It's also more sensitive in that it's looking for any change that you might want to save to disk, not just changes that could require rederivation.