Fix incorrect bindable usage

This commit is contained in:
Dean Herbert 2024-01-17 16:50:48 +09:00
parent e3989c854d
commit fe06402951
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -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 =>
{