Callback returns a null arraylist when getting data from firestore
I have created a callback function to get the arraylist of conversations when the task is completed. It gets all the data and adds it to the list but still, it returns null. Is there a way to fix this issue?
fetch conversations method:
private fun fetchConversations(fetchConversationsCallback: FetchConversationsCallback) {
db.collection("rooms")
.addSnapshotListener { value, error ->
if (error != null) {
Log.d(TAG, "Get failed with ",...