From 3c7c4598ff5a3eaff4c634c5c469d29c7e60d4e1 Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Sat, 3 Jan 2026 17:42:25 +0100 Subject: [PATCH 1/4] sort players in winner selection --- .../main_menu/match_view/match_result_view.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/presentation/views/main_menu/match_view/match_result_view.dart b/lib/presentation/views/main_menu/match_view/match_result_view.dart index e8075f6..c2076cc 100644 --- a/lib/presentation/views/main_menu/match_view/match_result_view.dart +++ b/lib/presentation/views/main_menu/match_view/match_result_view.dart @@ -143,11 +143,17 @@ class _MatchResultViewState extends State { } List getAllPlayers(Match match) { + List players = []; + if (match.group == null && match.players != null) { - return [...match.players!]; + players = [...match.players!]; } else if (match.group != null && match.players != null) { - return [...match.players!, ...match.group!.members]; + players = [...match.players!, ...match.group!.members]; + } else { + players = [...match.group!.members]; } - return [...match.group!.members]; + + players.sort((a, b) => a.name.compareTo(b.name)); + return players; } } From 072dba1cde3f11c4a3854925cbcc59091be0aae6 Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Sat, 3 Jan 2026 17:45:35 +0100 Subject: [PATCH 2/4] sort players in match tile --- lib/presentation/widgets/tiles/match_tile.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/presentation/widgets/tiles/match_tile.dart b/lib/presentation/widgets/tiles/match_tile.dart index 543a542..e89be2f 100644 --- a/lib/presentation/widgets/tiles/match_tile.dart +++ b/lib/presentation/widgets/tiles/match_tile.dart @@ -175,6 +175,8 @@ class _MatchTileState extends State { } } + allPlayers.sort((a, b) => a.name.compareTo(b.name)); return allPlayers; + ; } } From bdcee85eb9e283698fbb1f751616b13c5d0d183b Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Sat, 3 Jan 2026 17:49:15 +0100 Subject: [PATCH 3/4] sort players in group tile --- lib/presentation/widgets/tiles/group_tile.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/presentation/widgets/tiles/group_tile.dart b/lib/presentation/widgets/tiles/group_tile.dart index 248c1c6..5f870de 100644 --- a/lib/presentation/widgets/tiles/group_tile.dart +++ b/lib/presentation/widgets/tiles/group_tile.dart @@ -56,7 +56,9 @@ class GroupTile extends StatelessWidget { spacing: 12.0, runSpacing: 8.0, children: [ - for (var member in group.members) + for (var member in [ + ...group.members, + ]..sort((a, b) => a.name.compareTo(b.name))) TextIconTile(text: member.name, iconEnabled: false), ], ), From 7fa434782c04d8d03010436adf4fa31b2530f9da Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Sat, 3 Jan 2026 17:49:37 +0100 Subject: [PATCH 4/4] remove semicolon and empty line --- lib/presentation/widgets/tiles/match_tile.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/presentation/widgets/tiles/match_tile.dart b/lib/presentation/widgets/tiles/match_tile.dart index e89be2f..bfe1b9f 100644 --- a/lib/presentation/widgets/tiles/match_tile.dart +++ b/lib/presentation/widgets/tiles/match_tile.dart @@ -177,6 +177,5 @@ class _MatchTileState extends State { allPlayers.sort((a, b) => a.name.compareTo(b.name)); return allPlayers; - ; } }