1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 12:43:16 +08:00

Move room resetting logic from MatchSubScreen to LoungeSubScreen

This commit is contained in:
Jamie Taylor 2019-03-07 16:49:48 +09:00
parent 6e5ea78ca2
commit 50c1b3a576
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
2 changed files with 8 additions and 7 deletions

View File

@ -107,6 +107,14 @@ namespace osu.Game.Screens.Multi.Lounge
Filter.Search.HoldFocus = false;
}
public override void OnResuming(IScreen last)
{
base.OnResuming(last);
if (currentRoom.Value?.RoomID.Value == null)
currentRoom.Value = new Room();
}
private void joinRequested(Room room)
{
processingOverlay.Show();

View File

@ -53,9 +53,6 @@ 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;
@ -185,10 +182,6 @@ 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);
}