ajones05 / seearound.me-ionic

0 stars 0 forks source link

Mark posts that have been viewed as "Read" #240

Open ajones05 opened 7 years ago

ajones05 commented 7 years ago

@abdulhafeez Some feedback I've gotten is that it would be nice to see which posts have been seen already. This is a lower priority than the other changes I messaged you about on Upwork, but I wanted to ask you about how much work this would be to implement. I could design a new set of icons (maybe darker in color) that indicates status as "read."

abdulhafeez commented 7 years ago

I think in terms of implementation, it should not be a big task. Just an hour or so. But the big questions here is, how to go about it? How to determine that a post has been seen? I am not clear on this point. Once there is a good idea, implementation will not take much time.

ajones05 commented 7 years ago

I think it would make sense to do only for the map view...

If a user has seen at least the post preview then it counts as "viewed." Here's an example from another app. Basically it would work the same way and map markers would be made lighter in color image

yuriyua commented 7 years ago

@abdulhafeez I think we can do it from the server side. Let me know if I can any help

abdulhafeez commented 7 years ago

@ajones05 We can do it for map view only but there is still a problem: The post icon can be changed when the preview comes up and goes down again. But this change will not be permanent i.e. it will persist for a single session. If the app is reloaded for some reason, the icons will refresh and all posts will appear unread. So, I think some kind of persistence is must.

@yuriyua How can you determine on server side that a post has been viewed? Is it possible for both map view and list view?

yuriyua commented 7 years ago

I think mark as read after read post details. Mark as "New tap" just for the first time on the map.

abdulhafeez commented 7 years ago

Yes, that makes sense. So, I think, you will make APIs to mark the post read and include a post_read param on each post?

yuriyua commented 7 years ago

include a post_read param on each post

ok

you will make APIs to mark the post read

Should I make new API for call on post read, or we can mark it as read in the API mobile/post?

abdulhafeez commented 7 years ago

It will be a new API definitely. May be mobile/mark-read. You can name the parameter 'isRead'. 'The param 'isRead' should be present on each post in the response of mobile/request-nearest and mobile/myposts

yuriyua commented 7 years ago

ok, I will do it

yuriyua commented 7 years ago

done https://github.com/ajones05/seearound.me/wiki/Mobile-Api-Reference#-mobilepost-read

ajones05 commented 6 years ago

I know I mentioned already, but adding to this thread so it's all in one place: the tapped icons (to show marked as read) are here: https://www.dropbox.com/sh/2vdbfhwtfog7ihf/AAAzBDJRE9wqkwT6HghiDTvSa?dl=0

abdulhafeez commented 6 years ago

post-read api is working. Thanks! Done.

ajones05 commented 6 years ago

This is not working consistently. Sometimes it works, sometimes not. And sometimes when a post appears read, but then I tap on another icon, it returns to appear unread.