1
0
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:
Dean Herbert 2017-04-24 18:48:28 +09:00
parent ee659e7307
commit 4fa22146b8

View File

@ -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);
} }
} }