mirror of
https://github.com/ppy/osu
synced 2025-02-28 08:31:18 +00:00
Merge pull request #29186 from peppy/fix-status-config
Fix online status not persisting correctly
This commit is contained in:
commit
48e38bd467
osu.Game
@ -118,12 +118,11 @@ namespace osu.Game.Online.API
|
|||||||
u.OldValue?.Activity.UnbindFrom(activity);
|
u.OldValue?.Activity.UnbindFrom(activity);
|
||||||
u.NewValue.Activity.BindTo(activity);
|
u.NewValue.Activity.BindTo(activity);
|
||||||
|
|
||||||
if (u.OldValue != null)
|
u.OldValue?.Status.UnbindFrom(localUserStatus);
|
||||||
localUserStatus.UnbindFrom(u.OldValue.Status);
|
u.NewValue.Status.BindTo(localUserStatus);
|
||||||
localUserStatus.BindTo(u.NewValue.Status);
|
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
localUserStatus.BindValueChanged(val => configStatus.Value = val.NewValue);
|
localUserStatus.BindTo(configStatus);
|
||||||
|
|
||||||
var thread = new Thread(run)
|
var thread = new Thread(run)
|
||||||
{
|
{
|
||||||
@ -600,6 +599,7 @@ namespace osu.Game.Online.API
|
|||||||
password = null;
|
password = null;
|
||||||
SecondFactorCode = null;
|
SecondFactorCode = null;
|
||||||
authentication.Clear();
|
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
|
// Scheduled prior to state change such that the state changed event is invoked with the correct user and their friends present
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
|
@ -157,6 +157,7 @@ namespace osu.Game.Overlays.Login
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateDropdownCurrent(status.Value);
|
||||||
dropdown.Current.BindValueChanged(action =>
|
dropdown.Current.BindValueChanged(action =>
|
||||||
{
|
{
|
||||||
switch (action.NewValue)
|
switch (action.NewValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user