-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access beatmap store via abstract base class #31076
Conversation
The intention here is to make things more testable going forward. Specifically, to remove the "back-door" entrance into `BeatmapCarousel` where `BeatmapSets` can be set by tests and bypas/block realm retrieval.
106b00b
to
a868c33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty good 👍
// This is performing an unnecessary second lookup on realm (in addition to the subscription), but for performance reasons | ||
// we require it to be separate: the subscription's initial callback (with `ChangeSet` of `null`) will run on the update | ||
// thread. If we attempt to detach beatmaps in this callback the game will fall over (it takes time). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should probably remain in source? I don't see any reason why it would no longer be valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed IRL, comment should have been deleted in 466ed5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending confirmation of CI pass
The intention here is to make things more testable going forward. Specifically, to remove the "back-door" entrance into
BeatmapCarousel
whereBeatmapSets
can be set by tests and bypas/block realm retrieval.A few code quality improvements thrown in. Was on the fence as to whether I should actually remove the
BeatmapSets
test flow inBeatmapCarousel
since I am currently looking at replacing/rewriting that class completely, but it was low effort.