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:
parent
ce1579f2fe
commit
343271751a
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user