mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:12:54 +08:00
Increase safety of score lookups when leaderboard isn't visible.
This commit is contained in:
parent
ee659e7307
commit
4fa22146b8
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
@ -93,13 +94,18 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
|
|
||||||
|
private ScheduledDelegate pendingBeatmapSwitch;
|
||||||
|
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
{
|
{
|
||||||
get { return beatmap; }
|
get { return beatmap; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
beatmap = value;
|
beatmap = value;
|
||||||
Schedule(updateScores);
|
Scores = null;
|
||||||
|
|
||||||
|
pendingBeatmapSwitch?.Cancel();
|
||||||
|
pendingBeatmapSwitch = Schedule(updateScores);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user