mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 07:33: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:
parent
cebd38c6eb
commit
c142adf926
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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