wlanslovenija/PiplMesh

Wall post - date should be updated as time progresses

aljana opened this issue · 0 comments

Instead of dates, we are displaying how much time has elapsed since the post was created (for example "just now, 2 minutes ago, 3 days ago").

As time progresses and users keep their browser open, this has to be updated. So a post which is marked as "right now" should be marked as "5 minutes ago" after 5 minutes.

Currently these updates are made all at once. This has to be improved by writing a method to Post object, which wraps formatPostDate and, when called, sets the timeout to call itself again when it is time to update.
So when you show the date once, it will automatically be updated again and again. Of course newer posts must be updated more often then older posts.