1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 22:22:55 +08:00

Fix formatting

This commit is contained in:
Layendan 2025-01-22 11:42:11 -07:00
parent 2a5a2738e1
commit f673d16a1f
2 changed files with 23 additions and 17 deletions

View File

@ -44,7 +44,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
private IAPIProvider api { get; set; } = null!; private IAPIProvider api { get; set; } = null!;
[Resolved] [Resolved]
private OsuGame? game { get; set; } = null!; private OsuGame? game { get; set; }
public readonly Room Room; public readonly Room Room;
@ -348,13 +348,16 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
if (Room.RoomID.HasValue) if (Room.RoomID.HasValue)
{ {
items.AddRange([new OsuMenuItem("View in browser", MenuItemType.Standard, () => items.AddRange([
{ new OsuMenuItem("View in browser", MenuItemType.Standard, () =>
game?.OpenUrlExternally(formatRoomUrl(Room.RoomID.Value)); {
}), new OsuMenuItem("Copy link", MenuItemType.Standard, () => game?.OpenUrlExternally(formatRoomUrl(Room.RoomID.Value));
{ }),
game?.CopyUrlToClipboard(formatRoomUrl(Room.RoomID.Value)); new OsuMenuItem("Copy link", MenuItemType.Standard, () =>
})]); {
game?.CopyUrlToClipboard(formatRoomUrl(Room.RoomID.Value));
})
]);
} }
return items.ToArray(); return items.ToArray();

View File

@ -60,7 +60,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
private IAPIProvider api { get; set; } = null!; private IAPIProvider api { get; set; } = null!;
[Resolved] [Resolved]
private OsuGame? game { get; set; } = null!; private OsuGame? game { get; set; }
private readonly BindableWithCurrent<Room?> selectedRoom = new BindableWithCurrent<Room?>(); private readonly BindableWithCurrent<Room?> selectedRoom = new BindableWithCurrent<Room?>();
private Sample? sampleSelect; private Sample? sampleSelect;
@ -158,7 +158,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
public Popover GetPopover() => new PasswordEntryPopover(Room); public Popover GetPopover() => new PasswordEntryPopover(Room);
public MenuItem[] ContextMenuItems public new MenuItem[] ContextMenuItems
{ {
get get
{ {
@ -172,13 +172,16 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
if (Room.RoomID.HasValue) if (Room.RoomID.HasValue)
{ {
items.AddRange([new OsuMenuItem("View in browser", MenuItemType.Standard, () => items.AddRange([
{ new OsuMenuItem("View in browser", MenuItemType.Standard, () =>
game?.OpenUrlExternally(formatRoomUrl(Room.RoomID.Value)); {
}), new OsuMenuItem("Copy link", MenuItemType.Standard, () => game?.OpenUrlExternally(formatRoomUrl(Room.RoomID.Value));
{ }),
game?.CopyUrlToClipboard(formatRoomUrl(Room.RoomID.Value)); new OsuMenuItem("Copy link", MenuItemType.Standard, () =>
})]); {
game?.CopyUrlToClipboard(formatRoomUrl(Room.RoomID.Value));
})
]);
} }
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded) if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)