1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Removed unnecessary private method to update the metadata

This commit is contained in:
FreezyLemon 2017-11-27 08:48:12 +01:00
parent d49ee295d9
commit ac0942df86

View File

@ -188,7 +188,9 @@ namespace osu.Game.Screens.Select
ratingsContainer.FadeIn(transition_duration);
advanced.Beatmap = Beatmap;
loadDetailsAsync(Beatmap);
description.Text = Beatmap.Version;
source.Text = Beatmap.Metadata.Source;
tags.Text = Beatmap.Metadata.Tags;
var requestedBeatmap = Beatmap;
if (requestedBeatmap.Metrics == null)
@ -212,16 +214,6 @@ namespace osu.Game.Screens.Select
displayMetrics(requestedBeatmap.Metrics, false);
}
private void loadDetailsAsync(BeatmapInfo beatmap)
{
if (description == null || source == null || tags == null)
throw new InvalidOperationException($@"Requires all {nameof(MetadataSection)} elements to be non-null.");
description.Text = beatmap.Version;
source.Text = beatmap.Metadata?.Source;
tags.Text = beatmap.Metadata?.Tags;
}
private void displayMetrics(BeatmapMetrics metrics, bool failOnMissing = true)
{
var hasRatings = metrics?.Ratings?.Any() ?? false;
@ -267,7 +259,10 @@ namespace osu.Game.Screens.Select
private void clearStats()
{
loadDetailsAsync(null);
description.Text = null;
source.Text = null;
tags.Text = null;
advanced.Beatmap = new BeatmapInfo
{
StarDifficulty = 0,