1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Ensure spotlights always show at the top of the lounge listing

As proposed at https://github.com/ppy/osu/discussions/16936. Spotlights
are intended to have focus, so let's make sure they are the first thing
the user sees for the time being.
This commit is contained in:
Dean Herbert 2022-02-21 17:59:09 +09:00
parent ab8b502709
commit 02a8500500

View File

@ -124,7 +124,12 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
private void updateSorting()
{
foreach (var room in roomFlow)
roomFlow.SetLayoutPosition(room, -(room.Room.RoomID.Value ?? 0));
{
roomFlow.SetLayoutPosition(room, room.Room.Category.Value == RoomCategory.Spotlight
// Always show spotlight playlists at the top of the listing.
? float.MinValue
: -(room.Room.RoomID.Value ?? 0));
}
}
protected override bool OnClick(ClickEvent e)