removido os clubes do escalao juniores sem jogadores inscritos
This commit is contained in:
@@ -75,9 +75,11 @@ 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()) {
|
||||||
Club club = postSnapshot.getValue(Club.class);
|
if (postSnapshot.child("jogadores").child(currentEscalao).exists()) {
|
||||||
if (club != null) {
|
Club club = postSnapshot.getValue(Club.class);
|
||||||
clubs.add(club);
|
if (club != null) {
|
||||||
|
clubs.add(club);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClubAdapter adapter = new ClubAdapter(clubs, club -> {
|
ClubAdapter adapter = new ClubAdapter(clubs, club -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user