Currently the pushlog loads entries in reverse chronological order (the latest entries are shown on top instead of on the bottom). I want to maintain this functionality for the new entries that are loaded OnScroll. For my current implementation this is not occurring. Have a look at this example: http://sidkalra.com/files/mercurial/improvedPushlog2.png
Examine the date of the last entry before new items are loaded (Mon Sept 29 17:20:28 2008 – 0400) and then have a look at the date of the first new entry (Fri May 02 14:38:33 2008 – 0400). Even though this is reverse chronological order it is not correct since all the entries between May 02 and Sept 29 are missing.
Currently to load more entries OnScroll I am using a script that returns all the data I need. This script takes in two values, startID and endID. So this is what I’m doing currently:
- On first scroll: startID = 0, endID = 20
- On second scroll: startID = 21, endID = 40
- On third scroll: startID = 41, endID = 60
- and so on…
This obviously isn’t getting me the right data. I don’t understand which startID and endID I should start with. Having the startID = 0 obviously isn’t working. I’m kind of stuck on this issue.
From what I understand, the whole point of this feature is to mirror the functionality of pressing the Next link. When a user scrolls to the bottom of the page, the new entries should be identical to the entries that appear if one were to click on the next link.