show and hide buttons using firebase reference
Hello. I have a question I need to display the casino if I have the casino node. if you do not have the casino node that will display the buy casino button. I am using "if" "else" but apparently he is not checking the if because in any way for the user who has the casino node he displays the button "buycassino" and in the user who does not have the casino node he also displays the button "buycassino" I am attaching the debug along with the firebase structure. Thanks in advance. any help is welcome.
code:
final DatabaseReference ref = FirebaseDatabase.getInstance().getReference();
final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
final String userId = user.getUid();
ref.child("users").child(userId).addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for (DataSnapshot ds : dataSnapshot.getChildren()) {
if (ds.child("cassino").exists()) {
openCassino.setVisibility(View.VISIBLE);
buyCassino.setVisibility(View.GONE);
} else {
buyCassino.setVisibility(View.VISIBLE);
openCassino.setVisibility(View.GONE);
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
DEBUG IMG WITH USER THAT HAS A CASINO NODE.
DEBUG IMG WITH USER WHO DOES NOT HAVE A CASINO NODE.

MY XML FILE
<Button
android:id="@+id/buyCassino"
android:layout_width="183dp"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
android:text="Buy Cassino"
android:textColor="#FFFFFF"
android:visibility="invisible" />
<Button
android:id="@+id/openCassino"
android:layout_width="190dp"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
android:text="OPEN CASSINO"
android:textColor="#FFFFFF"
android:visibility="invisible" />