4 ms·
> Showing new/unread comments is also a cool idea but it will increase the amount of requests to the HN api. However I'm gonna look into it. At the simplest le
by kbenson 5y ago
> Showing new/unread comments is also a cool idea but it will increase the amount of requests to the HN api. However I'm gonna look into it.
At the simplest level LocalStorage or equivalent keyed on the submission id with a prior comment count to be compared with the new comment count would be sufficient. If it had a time of hast check as well, highlighting new comments would also be easy.
I'm not sure about other people, but thise are really the two things I care about most when trying to keep up with a discussion (are there new comments, and which are they).
- mkl 5y agoStoring view time would make things easy, but might break on subthreads. You can probably just store all the comment ids in LocalStorage, and highlight comments that aren't in that set before putting them in there (or maybe put them in there only when scrolled to/past).