From 8bd251ac7d09786c4b1527d5feb9322a3ec60534 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Thu, 5 Mar 2026 22:24:14 +0100 Subject: [PATCH] Fixed match result view with new db --- .../views/main_menu/match_view/match_result_view.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 820dcca..3d4587e 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 @@ -35,7 +35,10 @@ class _MatchResultViewState extends State { @override void initState() { db = Provider.of(context, listen: false); - allPlayers = getAllPlayers(widget.match); + + allPlayers = widget.match.players; + allPlayers.sort((a, b) => a.name.compareTo(b.name)); + if (widget.match.winner != null) { _selectedPlayer = allPlayers.firstWhere( (p) => p.id == widget.match.winner!.id,