From e3989c854d39ec82d1ea27ada8f70a9dea159633 Mon Sep 17 00:00:00 2001 From: StanR Date: Mon, 15 Jan 2024 16:57:22 +0600 Subject: [PATCH] Change `LoginPanel` to use `LocalUser.Status` for the dropdown --- osu.Game/Overlays/Login/LoginPanel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Login/LoginPanel.cs b/osu.Game/Overlays/Login/LoginPanel.cs index 513088ba0c..7db3644de6 100644 --- a/osu.Game/Overlays/Login/LoginPanel.cs +++ b/osu.Game/Overlays/Login/LoginPanel.cs @@ -139,7 +139,7 @@ namespace osu.Game.Overlays.Login }, }; - panel.Status.BindValueChanged(_ => updateDropdownCurrent(), true); + api.LocalUser.Value.Status.BindValueChanged(e => updateDropdownCurrent(e.NewValue), true); dropdown.Current.BindValueChanged(action => { @@ -172,9 +172,9 @@ namespace osu.Game.Overlays.Login ScheduleAfterChildren(() => GetContainingInputManager()?.ChangeFocus(form)); }); - private void updateDropdownCurrent() + private void updateDropdownCurrent(UserStatus? status) { - switch (panel.Status.Value) + switch (status) { case UserStatus.Online: dropdown.Current.Value = UserAction.Online;