Merge pull request 'Bugfix bei Spieleranzeige und Vereinfachung der Keine-Player-Logik' (#66) from bug/60-CreateGroupView-erstellter-Spieler-erscheint-nicht-in-alle-Spieler into development

Reviewed-on: #66
Reviewed-by: Felix Kirchner <felix.kirchner.fk@gmail.com>
This commit was merged in pull request #66.
This commit is contained in:
2025-11-23 21:41:08 +00:00

View File

@@ -209,12 +209,13 @@ class _CreateGroupViewState extends State<CreateGroupView> {
),
);
}
if (snapshot.connectionState ==
ConnectionState.done &&
(!snapshot.hasData ||
snapshot.data!.isEmpty ||
(selectedPlayers.isEmpty &&
allPlayers.isEmpty))) {
bool doneLoading =
snapshot.connectionState ==
ConnectionState.done;
bool snapshotDataEmpty =
!snapshot.hasData || snapshot.data!.isEmpty;
if (doneLoading &&
(snapshotDataEmpty && allPlayers.isEmpty)) {
return const Center(
child: TopCenteredMessage(
icon: Icons.info,