Skip to content
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

Fix statistics update not being shown on results screen if it arrives too fast #29985

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Sep 24, 2024

As reported in https://discord.com/channels/188630481301012481/1097318920991559880/1288160137286258799.

Can be manually induced outside of tests using

diff --git a/osu.Game/Screens/Ranking/Statistics/UserStatisticsPanel.cs b/osu.Game/Screens/Ranking/Statistics/UserStatisticsPanel.cs
index 4e9c07ab7b..f0f1c6d049 100644
--- a/osu.Game/Screens/Ranking/Statistics/UserStatisticsPanel.cs
+++ b/osu.Game/Screens/Ranking/Statistics/UserStatisticsPanel.cs
@@ -3,6 +3,7 @@
 
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
 using osu.Framework.Graphics;
@@ -30,6 +31,8 @@ public UserStatisticsPanel(ScoreInfo achievedScore)
         [BackgroundDependencyLoader]
         private void load(UserStatisticsWatcher? userStatisticsWatcher)
         {
+            Thread.Sleep(10000);
+
             if (userStatisticsWatcher != null)
             {
                 latestGlobalStatisticsUpdate = userStatisticsWatcher.LatestUpdate.GetBoundCopy();

@bdach bdach added area:results next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! labels Sep 24, 2024
@bdach bdach requested a review from a team September 24, 2024 15:55
@peppy peppy self-requested a review September 24, 2024 16:14
@peppy peppy merged commit 84d7fed into ppy:master Sep 24, 2024
7 of 9 checks passed
@bdach bdach deleted the user-statistics-update-too-fast branch September 24, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:results next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants