1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 02:12:55 +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(); Show();
} }
public void ShowBeatmapSet(BeatmapSetInfo set) public void ShowBeatmapSet(BeatmapSetInfo set, bool refetch = true)
{ {
// Re-fetching is the correct way forward. // 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); scroll.ScrollTo(0);
} }
} }