Closed jackjamieson2 closed 5 years ago
The first step of this is implemented, which was simply to add a sorting function when returning timelines.
There's still potential to have things out of order at page-breaks (timelines are returned in 'pages' of twenty items each)
I think I'll leave this for now, since I want to rethink the database structure (see #82) and that's probably the place to handle more substantial issues related to sorting
I just realized an annoying problem in Yarns.
Ideally, I would like to display posts in reverse chronological order.
Yarns gets close, but groups items from a single feed together. This is because items are ultimately ordered by
_id
, which matches the order that they were added to the database.The problem is that if multiple posts have been added to a feed in a short time, they'll be added in a cluster.
Solution is probably to eschew numerical ids, and instead use dates for sorting etc. This will require some adjustments to the paging functions