From 855d5dba3cfee04d9e506ca51359a1925e30f066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 24 Nov 2025 13:20:39 +0100 Subject: [PATCH] Bypass 300ms debounce when requesting local leaderboards in song select RFC. Would probably close https://github.com/ppy/osu/issues/35773. --- osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs b/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs index 8aa3a0516f..6e0ffafa63 100644 --- a/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs +++ b/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs @@ -237,17 +237,19 @@ namespace osu.Game.Screens.SelectV2 SetState(LeaderboardState.Retrieving); + var fetchScope = Scope.Value; + refetchOperation?.Cancel(); refetchOperation = Scheduler.AddDelayed(() => { var fetchBeatmapInfo = beatmap.Value.BeatmapInfo; var fetchRuleset = ruleset.Value ?? fetchBeatmapInfo.Ruleset; - var fetchSorting = Scope.Value == BeatmapLeaderboardScope.Local ? Sorting.Value : LeaderboardSortMode.Score; + var fetchSorting = fetchScope == BeatmapLeaderboardScope.Local ? Sorting.Value : LeaderboardSortMode.Score; // For now, we forcefully refresh to keep things simple. // In the future, removing this requirement may be deemed useful, but will need ample testing of edge case scenarios // (like returning from gameplay after setting a new score, returning to song select after main menu). - leaderboardManager.FetchWithCriteria(new LeaderboardCriteria(fetchBeatmapInfo, fetchRuleset, Scope.Value, FilterBySelectedMods.Value ? mods.Value.ToArray() : null, fetchSorting), + leaderboardManager.FetchWithCriteria(new LeaderboardCriteria(fetchBeatmapInfo, fetchRuleset, fetchScope, FilterBySelectedMods.Value ? mods.Value.ToArray() : null, fetchSorting), forceRefresh: true); if (!initialFetchComplete) @@ -257,7 +259,7 @@ namespace osu.Game.Screens.SelectV2 fetchedScores.BindValueChanged(_ => updateScores(), true); initialFetchComplete = true; } - }, initialFetchComplete ? 300 : 0); + }, initialFetchComplete && fetchScope != BeatmapLeaderboardScope.Local ? 300 : 0); } private void updateScores()