Every post has a published date, and they're in that order from latest to earliest. To go to the next page, find the bottom post, and get every post that's before that post, starting from the most recent. To go to the previous page, find the top post, then get every post that's after that post, starting from the most recent.
Except the most recent post after post #3050 is not post #3000. It's post #1. So attempting to go to the previous page just puts you on the very first page.
So I have to order by oldest post (after post X), then get a page of those, then reorder that page by latest post. Unless I'm sorting in reverse order, then it's opposite.
And if you want posts before X and after Y, then uhhhhhhh let's just... assume that I never want that. (before-sort-order with Y …
Every post has a published date, and they're in that order from latest to earliest. To go to the next page, find the bottom post, and get every post that's before that post, starting from the most recent. To go to the previous page, find the top post, then get every post that's after that post, starting from the most recent.
Except the most recent post after post #3050 is not post #3000. It's post #1. So attempting to go to the previous page just puts you on the very first page.
So I have to order by oldest post (after post X), then get a page of those, then reorder that page by latest post. Unless I'm sorting in reverse order, then it's opposite.
And if you want posts before X and after Y, then uhhhhhhh let's just... assume that I never want that. (before-sort-order with Y as the upper limit, then if they go backwards halfway through, switch to after-sort-order with X as the lower limit, so there'd have to be lower_limit, upper_limit, and afterbefore)
#programming #fediverse #help