mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 10:52:54 +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]
|
[Resolved]
|
||||||
private IRoomManager roomManager { get; set; }
|
private IRoomManager roomManager { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved(CanBeNull = true)]
|
||||||
private LoungeSubScreen loungeSubScreen { get; set; }
|
private LoungeSubScreen loungeSubScreen { get; set; }
|
||||||
|
|
||||||
public RoomsContainer()
|
public RoomsContainer()
|
||||||
@ -100,9 +100,10 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
|||||||
DuplicateRoom = () =>
|
DuplicateRoom = () =>
|
||||||
{
|
{
|
||||||
Room newRoom = room.CreateCopy();
|
Room newRoom = room.CreateCopy();
|
||||||
|
if (!newRoom.Name.Value.StartsWith("Copy of "))
|
||||||
newRoom.Name.Value = $"Copy of {room.Name.Value}";
|
newRoom.Name.Value = $"Copy of {room.Name.Value}";
|
||||||
|
|
||||||
loungeSubScreen.Open(newRoom);
|
loungeSubScreen?.Open(newRoom);
|
||||||
},
|
},
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user