sort finished tournament last in public chat view

closes lichess-org/tavern#19
pull/8198/head
Thibault Duplessis 2021-02-17 11:31:32 +01:00
parent 3fcf82a434
commit 089d7de9e0
1 changed files with 3 additions and 1 deletions

View File

@ -54,5 +54,7 @@ final class PublicChat(
/** Sort the tournaments by the tournaments most likely to require moderation attention
*/
private def sortTournamentsByRelevance(tournaments: List[(Tournament, UserChat)]) =
tournaments.sortBy(-_._1.nbPlayers)
tournaments.sortBy { t =>
(t._1.isFinished, -t._1.nbPlayers)
}
}