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

Add Schedule to ensure correct thread for UI code

This commit is contained in:
Dean Herbert 2023-06-23 14:07:33 +09:00
parent ce1579f2fe
commit 343271751a

View File

@ -176,7 +176,7 @@ namespace osu.Game.Overlays.Comments
private void updateCommitButtonState() =>
commitButton.Enabled.Value = loadingSpinner.State.Value == Visibility.Hidden && !string.IsNullOrEmpty(Current.Value);
private void updateStateForLoggedIn(ValueChangedEvent<APIState> state)
private void updateStateForLoggedIn(ValueChangedEvent<APIState> state) => Schedule(() =>
{
bool isAvailable = state.NewValue > APIState.Offline;
@ -193,7 +193,7 @@ namespace osu.Game.Overlays.Comments
commitButton.Hide();
logInButton.Show();
}
}
});
private partial class EditorTextBox : OsuTextBox
{