wlanslovenija / PiplMesh

A social info portal for wireless networks.
http://dev.wlan-si.net/wiki/PiplMesh
Other
40 stars 19 forks source link

Wall post - date should be updated as time progresses #276

Closed aljana closed 11 years ago

aljana commented 12 years ago

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.