mirror of https://github.com/ppy/osu
Add `Schedule` to ensure correct thread for UI code
This commit is contained in:
parent
ce1579f2fe
commit
343271751a
|
@ -176,7 +176,7 @@ protected override void LoadComplete()
|
|||
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 @@ private void updateStateForLoggedIn(ValueChangedEvent<APIState> state)
|
|||
commitButton.Hide();
|
||||
logInButton.Show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
private partial class EditorTextBox : OsuTextBox
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue