Tidy up fetch methods

Anonymise some test data further
This commit is contained in:
Dean Herbert
2019-06-27 12:00:31 +09:00
parent 375a6f406d
commit d6da21b0f0
3 changed files with 26 additions and 25 deletions

View File

@ -31,8 +31,6 @@ namespace osu.Game.Overlays
private RulesetStore rulesets;
private readonly OsuScrollContainer scroll;
private readonly Bindable<BeatmapSetInfo> beatmapSet = new Bindable<BeatmapSetInfo>();
// receive input outside our bounds so we can trigger a close event on ourselves.
@ -40,6 +38,7 @@ namespace osu.Game.Overlays
public BeatmapSetOverlay()
{
OsuScrollContainer scroll;
Info info;
ScoresContainer scores;
@ -76,6 +75,8 @@ namespace osu.Game.Overlays
{
info.Beatmap = b.NewValue;
scores.Beatmap = b.NewValue;
scroll.ScrollToStart();
};
}
@ -119,18 +120,14 @@ namespace osu.Game.Overlays
Show();
}
public void ShowBeatmapSet(BeatmapSetInfo set, bool refetch = true)
/// <summary>
/// Show an already fully-populated beatmap set.
/// </summary>
/// <param name="set">The set to show.</param>
public void ShowBeatmapSet(BeatmapSetInfo set)
{
// Re-fetching is the correct way forward.
if (refetch)
FetchAndShowBeatmapSet(set?.OnlineBeatmapSetID ?? 0);
else
{
beatmapSet.Value = set;
Show();
}
scroll.ScrollTo(0);
beatmapSet.Value = set;
Show();
}
}
}