mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 04:12:56 +08:00
Merge pull request #22387 from peppy/beatmap-leaderboard-cancel-request-eagerly
Fix beatmap leaderboard potentially showing incorrect leaderboard
This commit is contained in:
commit
054938be02
@ -104,6 +104,9 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
protected override APIRequest? FetchScores(CancellationToken cancellationToken)
|
protected override APIRequest? FetchScores(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
scoreRetrievalRequest?.Cancel();
|
||||||
|
scoreRetrievalRequest = null;
|
||||||
|
|
||||||
var fetchBeatmapInfo = BeatmapInfo;
|
var fetchBeatmapInfo = BeatmapInfo;
|
||||||
|
|
||||||
if (fetchBeatmapInfo == null)
|
if (fetchBeatmapInfo == null)
|
||||||
@ -152,8 +155,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
else if (filterMods)
|
else if (filterMods)
|
||||||
requestMods = mods.Value;
|
requestMods = mods.Value;
|
||||||
|
|
||||||
scoreRetrievalRequest?.Cancel();
|
|
||||||
|
|
||||||
var newRequest = new GetScoresRequest(fetchBeatmapInfo, fetchRuleset, Scope, requestMods);
|
var newRequest = new GetScoresRequest(fetchBeatmapInfo, fetchRuleset, Scope, requestMods);
|
||||||
newRequest.Success += response => Schedule(() =>
|
newRequest.Success += response => Schedule(() =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user