mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:43:21 +08:00
Fix friends list duplicating on connection failure
This commit is contained in:
parent
3c74d27deb
commit
e449d8dda0
@ -259,7 +259,11 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
var friendsReq = new GetFriendsRequest();
|
var friendsReq = new GetFriendsRequest();
|
||||||
friendsReq.Failure += _ => state.Value = APIState.Failing;
|
friendsReq.Failure += _ => state.Value = APIState.Failing;
|
||||||
friendsReq.Success += res => friends.AddRange(res);
|
friendsReq.Success += res =>
|
||||||
|
{
|
||||||
|
friends.Clear();
|
||||||
|
friends.AddRange(res);
|
||||||
|
};
|
||||||
|
|
||||||
if (!handleRequest(friendsReq))
|
if (!handleRequest(friendsReq))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user