Fix potential startup crash due to early application of animations

This was always haphazard code, but by luck it never triggered before
drawable load until now. With the recently nullability changes, this
would be triggered when `flash` is not yet constructed.

Switching to `AddOnce` seems safer to avoid multiple applications,
regardless.
This commit is contained in:
Dean Herbert 2023-07-28 17:17:14 +09:00
parent 57e51f4d5b
commit f58c69e639
1 changed files with 2 additions and 2 deletions

View File

@ -136,11 +136,11 @@ private void matchChanged(ValueChangedEvent<TournamentMatch?> match)
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;