1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 05:53:20 +08:00

Fix online status not persisting correctly

Regressed at some point.

I don't see much reason not to link the bindable directly with config.
It seems to work as you'd expect. Tested with logout (resets to
"Online") and connection failure (persists).

Closes https://github.com/ppy/osu/issues/29173.
This commit is contained in:
Dean Herbert 2024-07-29 19:58:19 +09:00
parent cebd38c6eb
commit c142adf926
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -118,12 +118,11 @@ namespace osu.Game.Online.API
u.OldValue?.Activity.UnbindFrom(activity);
u.NewValue.Activity.BindTo(activity);
if (u.OldValue != null)
localUserStatus.UnbindFrom(u.OldValue.Status);
localUserStatus.BindTo(u.NewValue.Status);
u.OldValue?.Status.UnbindFrom(localUserStatus);
u.NewValue.Status.BindTo(localUserStatus);
}, true);
localUserStatus.BindValueChanged(val => configStatus.Value = val.NewValue);
localUserStatus.BindTo(configStatus);
var thread = new Thread(run)
{

View File

@ -157,6 +157,7 @@ namespace osu.Game.Overlays.Login
},
};
updateDropdownCurrent(status.Value);
dropdown.Current.BindValueChanged(action =>
{
switch (action.NewValue)