1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 05:52:54 +08:00

Allow for not refetching in ShowBeatmapSet (will be used for tests)

This commit is contained in:
KingLuigi4932 2019-06-12 18:36:47 +03:00
parent a069a3029e
commit c5c6f6b9e0

View File

@ -118,10 +118,17 @@ namespace osu.Game.Overlays
Show();
}
public void ShowBeatmapSet(BeatmapSetInfo set)
public void ShowBeatmapSet(BeatmapSetInfo set, bool refetch = true)
{
// Re-fetching is the correct way forward.
FetchAndShowBeatmapSet(set?.OnlineBeatmapSetID ?? 0);
if (refetch)
FetchAndShowBeatmapSet(set?.OnlineBeatmapSetID ?? 0);
else
{
beatmapSet.Value = set;
Show();
}
scroll.ScrollTo(0);
}
}