This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void addListenerForChatRoomStillExits() { | |
String currentUserId = SessionManager.getInstance().getString(Constant.FIREBASE_CURRENT_USER_ID); | |
userDatabase.child("users").child(currentUserId).child("conversations").orderByChild("isAccepted").equalTo(true).addValueEventListener(new ValueEventListener() { | |
@Override | |
public void onDataChange(DataSnapshot dataSnapshot) { | |
boolean isRoomExits = false; | |
if (dataSnapshot.exists()) { | |
for (DataSnapshot data : dataSnapshot.getChildren()) { | |
Object object = data.getValue(); | |
HashMap lastMap = (HashMap) object; |