mirror of https://github.com/ppy/osu
Fix incorrect bindable usage
This commit is contained in:
parent
e3989c854d
commit
fe06402951
|
@ -38,6 +38,7 @@ public partial class LoginPanel : Container
|
|||
public Action? RequestHide;
|
||||
|
||||
private readonly IBindable<APIState> apiState = new Bindable<APIState>();
|
||||
private readonly Bindable<UserStatus?> userStatus = new Bindable<UserStatus?>();
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; } = null!;
|
||||
|
@ -139,7 +140,8 @@ private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule((
|
|||
},
|
||||
};
|
||||
|
||||
api.LocalUser.Value.Status.BindValueChanged(e => updateDropdownCurrent(e.NewValue), true);
|
||||
userStatus.BindTo(api.LocalUser.Value.Status);
|
||||
userStatus.BindValueChanged(e => updateDropdownCurrent(e.NewValue), true);
|
||||
|
||||
dropdown.Current.BindValueChanged(action =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue