I'm working on an android app which uses Firebase Realtime database. This app is quite similar like a social media app with limited functionality. The app will show the post contain text data to the users. I'm stuck with the two problem in which I solved the first one with the help of Pagination but couldn't able to solve the second . The problem is How can I identify if the post is already seen by the other users and then not show it again. like other social media platforms For example Quora, Quora will show different answer every time we open the app. Do I need to remap my data get this functionality ? My user object and post object will look something like this.
User{
Name;
Id;
Post;
}
Post {
dateCreated;
data;
userId;
}
My database tree structure will look something like this
ROOT
/ \
POST Users
I'm keeping the copy of the post in child node of ROOT that is POST and also in every users node to get the post posted by the user. PS: sorry for the poor English.