mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:43:22 +08:00
Set Online
state sooner in connection process
This isn't really required as such, but feels more correct. There was no reason for it to wait for the friend population to complete before deeming things to be "online".
This commit is contained in:
parent
65a1daf211
commit
7ec67c28b9
@ -195,6 +195,8 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
setLocalUser(user);
|
setLocalUser(user);
|
||||||
|
|
||||||
|
//we're connected!
|
||||||
|
state.Value = APIState.Online;
|
||||||
failureCount = 0;
|
failureCount = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,13 +210,7 @@ namespace osu.Game.Online.API
|
|||||||
var friendsReq = new GetFriendsRequest();
|
var friendsReq = new GetFriendsRequest();
|
||||||
|
|
||||||
friendsReq.Failure += _ => failConnectionProcess();
|
friendsReq.Failure += _ => failConnectionProcess();
|
||||||
friendsReq.Success += res =>
|
friendsReq.Success += res => friends.AddRange(res);
|
||||||
{
|
|
||||||
friends.AddRange(res);
|
|
||||||
|
|
||||||
//we're connected!
|
|
||||||
state.Value = APIState.Online;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!handleRequest(friendsReq))
|
if (!handleRequest(friendsReq))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user