1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 18:47:27 +08:00

Make beatmap non-nullable

Doesn't seem like it'll be null after first set: 5454d1caa1/osu.Game/OsuGameBase.cs (L363)
This commit is contained in:
Joseph Madamba 2023-09-05 14:43:43 -07:00
parent b63c1e4257
commit 5becac6431
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76

View File

@ -128,9 +128,9 @@ namespace osu.Game.Screens.Select
this.FadeOut(200, Easing.OutQuint);
}
private WorkingBeatmap? beatmap;
private WorkingBeatmap beatmap = null!;
public WorkingBeatmap? Beatmap
public WorkingBeatmap Beatmap
{
get => beatmap;
set
@ -149,12 +149,6 @@ namespace osu.Game.Screens.Select
{
Scheduler.AddOnce(() =>
{
if (beatmap == null)
{
removeOldInfo();
return;
}
LoadComponentAsync(loadingInfo = new Container
{
Padding = new MarginPadding { Right = colour_bar_width },
@ -198,8 +192,6 @@ namespace osu.Game.Screens.Select
void removeOldInfo()
{
State.Value = beatmap == null ? Visibility.Hidden : Visibility.Visible;
DisplayedContent?.FadeOut(transition_duration);
DisplayedContent?.Expire();
DisplayedContent = null;