New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort 'Playing' games in the lobby by play time. #12959 #12973

Merged
merged 1 commit into from Apr 1, 2017

Conversation

Projects
None yet
3 participants
@rob-v
Contributor

rob-v commented Mar 16, 2017

No description provided.

@rob-v

This comment has been minimized.

Show comment
Hide comment
@rob-v

rob-v Mar 16, 2017

Contributor

The compare here is wrong, in VS it shows properly that only few lines were changed:

				foreach (var modGamesByState in modGames.GroupBy(listOrder).OrderBy(g => g.Key))
				{
					// 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;
Contributor

rob-v commented Mar 16, 2017

The compare here is wrong, in VS it shows properly that only few lines were changed:

				foreach (var modGamesByState in modGames.GroupBy(listOrder).OrderBy(g => g.Key))
				{
					// 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;
@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Mar 16, 2017

Member

Using ?w=1 makes it easier to read as well: https://github.com/OpenRA/OpenRA/pull/12973/files?w=1

Member

abcdefg30 commented Mar 16, 2017

Using ?w=1 makes it easier to read as well: https://github.com/OpenRA/OpenRA/pull/12973/files?w=1

@rob-v

This comment has been minimized.

Show comment
Hide comment
@rob-v

rob-v Mar 16, 2017

Contributor

thanks, you're right.

Contributor

rob-v commented Mar 16, 2017

thanks, you're right.

@abcdefg30

👍

@obrakmann

👍
I'm not sure if the person requesting this change would like a ascending or descending sort order, but I guess it makes sense for games to slowly trickle down the list (from 'waiting with players' to 'just started' to 'going on for a while' to 'server just restarted and is now empty')

@obrakmann obrakmann merged commit b492e1e into OpenRA:bleed Apr 1, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@obrakmann

This comment has been minimized.

Show comment
Hide comment
@obrakmann
Contributor

obrakmann commented Apr 1, 2017

@rob-v rob-v deleted the rob-v:SortPlayingGamesInLobby branch Apr 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment