1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-16 05:52:57 +08:00

Allow LoungeSubScreen to be null (fix test)

This commit is contained in:
voidedWarranties 2020-08-15 14:27:49 -07:00
parent 7a33a6b08a
commit f587781058

View File

@ -38,7 +38,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
[Resolved]
private IRoomManager roomManager { get; set; }
[Resolved]
[Resolved(CanBeNull = true)]
private LoungeSubScreen loungeSubScreen { get; set; }
public RoomsContainer()
@ -100,9 +100,10 @@ namespace osu.Game.Screens.Multi.Lounge.Components
DuplicateRoom = () =>
{
Room newRoom = room.CreateCopy();
newRoom.Name.Value = $"Copy of {room.Name.Value}";
if (!newRoom.Name.Value.StartsWith("Copy of "))
newRoom.Name.Value = $"Copy of {room.Name.Value}";
loungeSubScreen.Open(newRoom);
loungeSubScreen?.Open(newRoom);
},
Action = () =>
{