Extract leaderboard fetch logic from song select beatmap leaderboard drawable #32494
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.
RFC. Another attempt at this.
This is a weird diff because I am feeling rather boxed in by all the constraints, namely that:
BeatmapLeaderboard
itself. That's because trying to e.g. not haveBeatmapLeaderboard
pass the beatmap and the ruleset to the global leaderboard manager is worse, as it essentially introduces two parallel paths of execution that need to be somehow merged into one (as in I'd have to somehow syncLeaderboardManager
responding to global beatmap/ruleset changes withBeatmapLeaderboard
which is also doing the same viaRefetchScores()
inheritance hell)FetchWithCriteriaAsync()
(because I need to be able to respond to online requests taking time, or failing), but also theBeatmapLeaderboard
only uses the publicScores
bindable to actually read the scores (because it needs to respond to new local scores arriving).BeatmapLeaderboard
, andLeaderboardManager
's state will remain as whatever it was before that scope change was requested, which may be considered good or it may not (I imagine it's better to show any scores in gameplay than not in this case, but maybe I'm wrong?)