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;
|
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;
|
// Sort 'Playing' games by Started, others by number of players
|
||||||
if (game == null || Filtered(game))
|
foreach (var game in modGamesByState.Key == 2 ? modGamesByState.OrderByDescending(g => g.Started) : modGamesByState.OrderByDescending(g => g.Players))
|
||||||
|
{
|
||||||
|
if (Filtered(game))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var canJoin = game.IsJoinable;
|
var canJoin = game.IsJoinable;
|
||||||
@@ -451,6 +453,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
rows.Add(item);
|
rows.Add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Game.RunAfterTick(() =>
|
Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user