From ba80d1e2d5e766a5791b047fcad736adb4f54340 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 30 Jul 2023 02:49:13 +0900 Subject: [PATCH] remove nullable for Box --- osu.Game.Tournament/Components/TournamentBeatmapPanel.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs index 0f916d931d..ba922c7c7b 100644 --- a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs +++ b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs @@ -28,7 +28,7 @@ namespace osu.Game.Tournament.Components private readonly Bindable currentMatch = new Bindable(); - private Box? flash; + private Box flash = null!; public TournamentBeatmapPanel(TournamentBeatmap? beatmap, string mod = "") { @@ -135,11 +135,12 @@ namespace osu.Game.Tournament.Components match.OldValue.PicksBans.CollectionChanged -= picksBansOnCollectionChanged; if (match.NewValue != null) match.NewValue.PicksBans.CollectionChanged += picksBansOnCollectionChanged; - updateState(); + + Scheduler.AddOnce(updateState); } private void picksBansOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) - => updateState(); + => Scheduler.AddOnce(updateState); private BeatmapChoice? choice; @@ -157,7 +158,7 @@ namespace osu.Game.Tournament.Components if (newChoice != null) { if (shouldFlash) - flash?.FadeOutFromOne(500).Loop(0, 10); + flash.FadeOutFromOne(500).Loop(0, 10); BorderThickness = 6;