Simplify realm model tracking in BeatmapCarousel
(and fix hard delete handling)
#28769
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements a simplification touched on in inline todo commentary by storing a list of GUIDs so we can properly track realm deletions (without needing to double-up on subscriptions).
Why did I do this now? It turns out we have never been handling hard deletions correctly, and this change resolves that issue. We use hard deletions in the
ImportAsUpdate
flow which I'm relying on for editor beatmap filesystem mounting, and this issue was blocking the ability to reliably reload the beatmap.Passes existing tests and some stress testing of my own. The only potential issue could be that
beatmapsChanged
is now fired more often (on any change to a beatmap in realm), but I can't seem to have this cause an issue.f5ef3ca is optional but just felt more correct.