Fix toast display potentially causing a child mutation before load complete

This commit is contained in:
Dean Herbert 2021-12-01 01:55:14 +09:00
parent 857e559f87
commit 03e1305b3f

View File

@ -95,13 +95,13 @@ namespace osu.Game.Overlays
/// Displays the provided <see cref="Toast"/> temporarily.
/// </summary>
/// <param name="toast"></param>
public void Display(Toast toast)
public void Display(Toast toast) => Schedule(() =>
{
box.Child = toast;
DisplayTemporarily(box);
}
});
private void displayTrackedSettingChange(SettingDescription description) => Schedule(() => Display(new TrackedSettingToast(description)));
private void displayTrackedSettingChange(SettingDescription description) => Display(new TrackedSettingToast(description));
private TransformSequence<Drawable> fadeIn;
private ScheduledDelegate fadeOut;