removido os clubes do escalao juniores sem jogadores inscritos

This commit is contained in:
2026-03-10 16:58:56 +00:00
parent cc868d0d4e
commit 5e78833411

View File

@@ -75,11 +75,13 @@ public class ClubsFragment extends Fragment {
public void onDataChange(@NonNull DataSnapshot snapshot) { public void onDataChange(@NonNull DataSnapshot snapshot) {
List<Club> clubs = new ArrayList<>(); List<Club> clubs = new ArrayList<>();
for (DataSnapshot postSnapshot : snapshot.getChildren()) { for (DataSnapshot postSnapshot : snapshot.getChildren()) {
if (postSnapshot.child("jogadores").child(currentEscalao).exists()) {
Club club = postSnapshot.getValue(Club.class); Club club = postSnapshot.getValue(Club.class);
if (club != null) { if (club != null) {
clubs.add(club); clubs.add(club);
} }
} }
}
ClubAdapter adapter = new ClubAdapter(clubs, club -> { ClubAdapter adapter = new ClubAdapter(clubs, club -> {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("clube_selecionado", club); bundle.putSerializable("clube_selecionado", club);