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:
parent
7a33a6b08a
commit
f587781058
@ -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 = () =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user