I'm running a query to check on a boolean (isLocked), to know if one or more of the documents are locked:
final CollectionReference ref = FirebaseFirestore.getInstance().collection( "folders" ).document( user.getUid() ).collection( folder );
Query query = ref.whereEqualTo( "isLocked", true );
query.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
boolean b = task.getResult().isEmpty();
ToastEX.showShort( MainActivity.this, b ? "isLocked=1" : "isLocked=0");
}
});
This always return isLocked=1, regardless of what's on the database.
How do I get this to work? Thanks a lot.
