-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Ensure global leaderboard state matches beatmap when loading player #33878
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
Conversation
Closes ppy#33835. I love fixing issues multiple times. Notably the refetch is not forced so this should be a no-op if the global state is already correct. ppy#33835 (comment) says > but we should also consider adding a force `RunTask` of the pending debounce before entering gameplay, probably around here: > > https://github.com/ppy/osu/blob/3192eaa2a20f20495db8431d3d6f35af7c705a94/osu.Game/Screens/SelectV2/SongSelect.cs#L420 but I am not confident in making that change as I have no idea whether it is correct or not.
I'd be inclined to make the change as a "makes sense" thing. Basically means song select has the correct beatmap on suspending, rather than potentially on resuming to song select and having it suddenly change. Okay if I add that in this PR? Doesn't seem to break any tests. diff --git a/osu.Game/Screens/SelectV2/SongSelect.cs b/osu.Game/Screens/SelectV2/SongSelect.cs
index 744c990317..d65a8a49dd 100644
--- a/osu.Game/Screens/SelectV2/SongSelect.cs
+++ b/osu.Game/Screens/SelectV2/SongSelect.cs
@@ -417,6 +417,8 @@ private void detachTrackDucking()
/// <param name="startAction">The action to perform if conditions are met to be able to proceed. May not be invoked if in an invalid state.</param>
public void SelectAndRun(BeatmapInfo beatmap, Action startAction)
{
+ if (selectionDebounce?.State == ScheduledDelegate.RunState.Waiting)
+ selectionDebounce?.RunTask();
selectionDebounce?.Cancel();
if (!this.IsCurrentScreen())
(Notably, it doesn't fix the issue, likely due to the leaderboard not being in a good state at that point to refetch the scores.) |
I mean sure you can add it but I'm not sure I can make much sense of that debounce stuff at all at this stage.
All of this has me in a place where I'm no longer sure of what's going on, or why this is being flushed and where. |
You say yesterday, but the only change I can see is last week Is this the one you're referring to? The debounce is only there to stop the statistics on song select from updating too often. The rationale behind forcing it is so things are in a good state before/when leaving the screen. I'll address this in a separate PR and tidy things up. |
Yeah I guess that's my mistake, authored a week ago, but I reviewed it yesterday. |
Closes #33835.
I love fixing issues multiple times.
Notably the refetch is not forced so this should be a no-op if the global state is already correct.
#33835 (comment) says
but I am not confident in making that change as I have no idea whether it is correct or not.