1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 01:42:59 +08:00

Always populate action to make button behave better in testing scenarios

This commit is contained in:
Dean Herbert 2021-11-19 15:27:38 +09:00
parent 5034cb1025
commit 741c27c1f2

View File

@ -28,8 +28,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards.Buttons
[BackgroundDependencyLoader(true)]
private void load(OsuGame? game, BeatmapDownloadTracker downloadTracker)
{
if (game != null)
Action = () => game.PresentBeatmap(beatmapSet);
Action = () => game?.PresentBeatmap(beatmapSet);
((IBindable<DownloadState>)downloadState).BindTo(downloadTracker.State);
}