1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:57:52 +08:00

Merge pull request #29186 from peppy/fix-status-config

Fix online status not persisting correctly
This commit is contained in:
Bartłomiej Dach 2024-07-29 16:11:05 +02:00 committed by GitHub
commit 48e38bd467
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 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)
{
@ -600,6 +599,7 @@ namespace osu.Game.Online.API
password = null;
SecondFactorCode = null;
authentication.Clear();
configStatus.Value = UserStatus.Online;
// Scheduled prior to state change such that the state changed event is invoked with the correct user and their friends present
Schedule(() =>

View File

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