1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Invert scheduling order

This commit is contained in:
smoogipoo 2019-05-09 13:42:04 +09:00
parent 3fed165b74
commit 35624a5d1c

View File

@ -355,9 +355,11 @@ namespace osu.Game.Online.API
password = null; password = null;
authentication.Clear(); authentication.Clear();
State = APIState.Offline;
// Scheduled prior to state change such that the state changed event is invoked with the correct user present
Schedule(() => LocalUser.Value = createGuestUser()); Schedule(() => LocalUser.Value = createGuestUser());
State = APIState.Offline;
} }
private static User createGuestUser() => new GuestUser(); private static User createGuestUser() => new GuestUser();