ajones05 / seearound.me-ionic

0 stars 0 forks source link

Bug - see nearby posts on user's profile #190

Closed ajones05 closed 7 years ago

ajones05 commented 7 years ago

If I follow the link from a post to that user's profile, and then go to "see nearby posts" the posts appear for a second but then disappear. It should show up to 15 most recent from that user.

abdulhafeez commented 7 years ago

I could reproduce the bug so I do see posts around the user's location. However, I noticed that the posts around were not confined to that particular user. It was probably by design. Do you want to change it?

ajones05 commented 7 years ago

Yes please, they should be from just that user

ajones05 commented 7 years ago

It seems to show just posts from that user, which is correct. But it only shows any of their posts within the top 15 (made by anyone). So basically only posts are visible if the user has posted very recently... but it should not be limited that way

abdulhafeez commented 7 years ago

OK, then this requires a new API which accepts user id as parameter and returns the list of nearby posts of that user. I looked into docs and did not find such API. @yuriyua do we have this kind of API?

yuriyua commented 7 years ago

@abdulhafeez We do not have this API. I will add user id parameter to this api tomorrow.

yuriyua commented 7 years ago

I added optional user_id parameter to the mobile/myposts API

https://github.com/ajones05/seearound.me/wiki/Mobile-Api-Reference/_compare/5061cfa15f9bfc0716a6a4f612049dc0fe7bc4df...fd61fbbf08d8fc1e4d503f2b3be4769fed664a24

Query example for view user ID 59 posts from the profile ID 276 https://www.seearound.me/admin/mobile-api/myposts/token/EH5PNN1C3Y39NFQVH19G45Q1ASBYEYXVG2K7PKIRIM385T4MTD6ZIX1VQBT79Q3R/user_id/59/latitude/37.8043637/longitude/-122.271/filter/0/submit

you should send parameters user_id=XXX and filter=0

abdulhafeez commented 7 years ago

Thanks! This fixed the issue.

ajones05 commented 7 years ago

This works perfectly, except when hitting the back arrow to go back to the user profile, it should cancel the filter (right now when I go back to the map or list, it is still showing only that user's posts)

abdulhafeez commented 7 years ago

Fixed