Sort 'Playing' games in the lobby by play time. #12959
This commit is contained in:
@@ -391,10 +391,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
return 3;
|
||||
};
|
||||
|
||||
foreach (var loop in modGames.OrderBy(listOrder).ThenByDescending(g => g.Players))
|
||||
foreach (var modGamesByState in modGames.GroupBy(listOrder).OrderBy(g => g.Key))
|
||||
{
|
||||
var game = loop;
|
||||
if (game == null || Filtered(game))
|
||||
// Sort 'Playing' games by Started, others by number of players
|
||||
foreach (var game in modGamesByState.Key == 2 ? modGamesByState.OrderByDescending(g => g.Started) : modGamesByState.OrderByDescending(g => g.Players))
|
||||
{
|
||||
if (Filtered(game))
|
||||
continue;
|
||||
|
||||
var canJoin = game.IsJoinable;
|
||||
@@ -451,6 +453,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
rows.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Game.RunAfterTick(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user