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:
parent
8a69fc5534
commit
5de6e29294
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user