From fe06402951ada9980fe5c02308cab9423bacfa20 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 17 Jan 2024 16:50:48 +0900 Subject: [PATCH] Fix incorrect bindable usage --- osu.Game/Overlays/Login/LoginPanel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Login/LoginPanel.cs b/osu.Game/Overlays/Login/LoginPanel.cs index 7db3644de6..ea65656eb1 100644 --- a/osu.Game/Overlays/Login/LoginPanel.cs +++ b/osu.Game/Overlays/Login/LoginPanel.cs @@ -38,6 +38,7 @@ public partial class LoginPanel : Container public Action? RequestHide; private readonly IBindable apiState = new Bindable(); + private readonly Bindable userStatus = new Bindable(); [Resolved] private IAPIProvider api { get; set; } = null!; @@ -139,7 +140,8 @@ private void onlineStateChanged(ValueChangedEvent 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 => {