1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Reset currentRoom state when cancelling room creation

This commit is contained in:
Jamie Taylor 2019-03-06 17:13:41 +09:00
parent 8a69fc5534
commit 5de6e29294
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -53,6 +53,9 @@ namespace osu.Game.Screens.Multi.Match
private MatchLeaderboard leaderboard;
[Resolved]
private Bindable<Room> currentRoom { get; set; }
public MatchSubScreen(Room room)
{
Title = room.RoomID.Value == null ? "New room" : room.Name.Value;
@ -182,6 +185,10 @@ namespace osu.Game.Screens.Multi.Match
public override bool OnExiting(IScreen next)
{
RoomManager?.PartRoom();
if (roomId.Value == null)
currentRoom.Value = new Room();
return base.OnExiting(next);
}