mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +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() =>
|
private void updateCommitButtonState() =>
|
||||||
commitButton.Enabled.Value = loadingSpinner.State.Value == Visibility.Hidden && !string.IsNullOrEmpty(Current.Value);
|
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;
|
bool isAvailable = state.NewValue > APIState.Offline;
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
commitButton.Hide();
|
commitButton.Hide();
|
||||||
logInButton.Show();
|
logInButton.Show();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
private partial class EditorTextBox : OsuTextBox
|
private partial class EditorTextBox : OsuTextBox
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user