mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:12:56 +08:00
Cancel room joins on part
This commit is contained in:
parent
95ff48c123
commit
b6457f0ce9
@ -87,9 +87,8 @@ namespace osu.Game.Screens.Multi
|
||||
public void JoinRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
|
||||
{
|
||||
currentJoinRoomRequest?.Cancel();
|
||||
currentJoinRoomRequest = null;
|
||||
|
||||
currentJoinRoomRequest = new JoinRoomRequest(room, api.LocalUser.Value);
|
||||
|
||||
currentJoinRoomRequest.Success += () =>
|
||||
{
|
||||
joinedRoom = room;
|
||||
@ -108,6 +107,8 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
public void PartRoom()
|
||||
{
|
||||
currentJoinRoomRequest?.Cancel();
|
||||
|
||||
if (joinedRoom == null)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user