1

I created an app where I must show data according to whether current user follows post publisher or not. For example, if user A follows user B show B's posts to A. My current firestore db structure provided below:

Users (collection) -> userId (document) -> Following (collection) -> followingUserId (document)

I just want to know how I can show only posts from followed users. Your db structure suggestions is highly appreciated also. Thanks in advance

DB images:

enter image description here

enter image description here

RamammDev
  • 113
  • 1
  • 7
  • Instead of describing how your database looks like, please add a screenshot of it. Besides that, what have you tried so far? – Alex Mamo Mar 20 '21 at 08:12
  • @AlexMamo Thanks for reply. I edited my question above you can find DB images there. So far I have tried nothing special on that problem because I need insight on how to approach to this kind of situations. – RamammDev Mar 20 '21 at 10:17
  • I think [answer](https://stackoverflow.com/a/52153332/5246885) might help, right? – Alex Mamo Mar 20 '21 at 10:44

0 Answers0