From 87856e6548d4a8ed9595d3f752b709ecf081f690 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Fri, 2 Jan 2026 18:41:39 +0100 Subject: [PATCH] Simplified info texts --- lib/presentation/widgets/player_selection.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/presentation/widgets/player_selection.dart b/lib/presentation/widgets/player_selection.dart index 112df65..e9aacd3 100644 --- a/lib/presentation/widgets/player_selection.dart +++ b/lib/presentation/widgets/player_selection.dart @@ -270,14 +270,13 @@ class _PlayerSelectionState extends State { /// Determines the appropriate info text to display when no players /// are available in the suggested players list. String _getInfoText() { - if (widget.availablePlayers != null && widget.availablePlayers!.isEmpty) { - // Available players list is provided but empty - return 'All players added to the match'; - } else if (allPlayers.isEmpty) { + if (allPlayers.isEmpty) { // No players exist in the database return 'No players created yet'; - } else if (selectedPlayers.length == allPlayers.length) { - // All players have been selected + } else if (selectedPlayers.length == allPlayers.length || + widget.availablePlayers?.isEmpty == true) { + // All players have been selected or + // available players list is provided but empty return 'No more players to add'; } else { // No players match the search query