Firebase Database users know that there are two basic listeners for listening Data: ValueEventListener and ChildEventListener. It works great when
I would anyday use onchildAdded listener in this case, there are several advantages of it, firstly you have figured out the network operation that is suppose there are 100 posts and even if one gets changed you will get callback of all of them. Whereas in onChildListener you will get callback of the only post that got changed. So what you can do is map the callbacks of firebase with the recycler views methods like this::-
onChildAdded --> you must cast the dataSnapshot into your class and call recyclerView.notifyItemAdded()
onChildRemoved --> recyclerView.notifyItemRemoved(int)
onChildChanged --> recyclerView.notifyItemChanged(int)
onChildMoved --> (you probably don't need this, it is for ordering/priority)