mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:12:54 +08:00
Don't create a new request if onlineId is null
This commit is contained in:
parent
6095480a54
commit
520924b440
@ -40,15 +40,15 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
panel = null;
|
||||
}
|
||||
|
||||
var onlineId = item.NewValue?.Beatmap.OnlineBeatmapID ?? 0;
|
||||
var onlineId = item.NewValue?.Beatmap.OnlineBeatmapID;
|
||||
|
||||
if (onlineId != 0)
|
||||
if (onlineId.HasValue)
|
||||
{
|
||||
request = new GetBeatmapSetRequest(onlineId, BeatmapSetLookupType.BeatmapId);
|
||||
request = new GetBeatmapSetRequest(onlineId.Value, BeatmapSetLookupType.BeatmapId);
|
||||
request.Success += beatmap =>
|
||||
{
|
||||
panel = new DirectGridPanel(beatmap.ToBeatmapSet(rulesets));
|
||||
LoadComponentAsync(panel, p => { AddInternal(panel); });
|
||||
LoadComponentAsync(panel, p => { AddInternal(p); });
|
||||
};
|
||||
api.Queue(request);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user