@Override public void onJoinedRoom(QBChatRoom pRoom) { chatRoom = pRoom; chatRoom.addMessageListener(app.getMsgManager()); chatRoom.addParticipantListener(pParticipantListener); app.setJoinedRoom(chatRoom); pRoom.setmRoomReceivingListener(null); }
@Override public void release() { app.getMsgManager().downloadPersistentRoom(); if (chatRoom != null) { chatRoom.removeMessageListener(app.getMsgManager()); chatRoom.leave(); app.setJoinedRoom(null); } }