I am trying to create a chat app. What I want:
- To implement an infinite list of previous messages
- To append new messages to the beginning of list whenever a new message is received/sent.
I have implemented infinite list of previous messages using paging library 3 and listen to new messages using Firestore Snapshot listener.
My problem now is I can't find a way to append the new list of messages obtained by the snapshot listener with the paging adapter showing my previous list
I tried using separate recycler views for displaying previous message and live messages, but it's not working correctly.