Merge pull request #20419 from peppy/fix-drawable-mutation-batch

Fix off-thread drawable mutation in multiplayer settings overlay when an error occurs
This commit is contained in:
Salman Ahmed
2022-09-23 18:13:06 +03:00
committed by GitHub

View File

@ -424,7 +424,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private void hideError() => ErrorText.FadeOut(50);
private void onSuccess(Room room)
private void onSuccess(Room room) => Schedule(() =>
{
Debug.Assert(applyingSettingsOperation != null);
@ -432,9 +432,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
applyingSettingsOperation.Dispose();
applyingSettingsOperation = null;
}
});
private void onError(string text)
private void onError(string text) => Schedule(() =>
{
Debug.Assert(applyingSettingsOperation != null);
@ -455,7 +455,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
applyingSettingsOperation.Dispose();
applyingSettingsOperation = null;
}
});
}
public class CreateOrUpdateButton : TriangleButton