Reputation: 331
Let me illustrate my problem first,
I have three collections in my cloud Firestore 'followers', 'posts' and 'timeline'. (1) 'followers' contain all those user id's whom I am following (2) 'posts' contain all the information which the particular user has posted. (3) 'timeline' contain all the posts of the users whom I am following.
My problem is that how can I implement timeline collection in flutter ? I am not able to filter information which I want to include in my flutter App. I want help on this part.
Thanks
Upvotes: 0
Views: 106
Reputation: 171
Keeping a timeline like that on the firestore is probably something you don't want. Everytime a user makes a post you have to find all users that are following him and update their timeline too, which will result in a lot of duplicated information and wasted processing power.
You'll probably have better results if you "generate" the timeline inside the app for each user, e.g.: when the user signs in, you fetch all the posts (or maybe just the first 50 or something) of the users he's following
Upvotes: 1