Monday, February 13, 2012

Next and Previous buttons not stopping at first/last page

There is a small bug in SifterReader v1.5, but it does not effect the functionality. If you use the "prev" or "next" buttons to navigate your issues and try to view a page before the first or after the last, you'll get a special page that says, "Oops!" and the error is "JSONException: No Value for Page." Just press the back key for now, and it will take you to the last page you were on.

I apologize for the inconvenience. I will try to fix this as soon as possible. I have already entered it into the bug tracker as issue #25 Next and Previous buttons not stopping at first/last.

3 comments:

  1. This bug has been resolved. See issue #25 for more details. Basically, I think there was a change in the SifterAPI. In the Issues Listing there are two fields for the previous and next page url, but if you're at the first or last page then it should say null. It used to use the primitive null, but somehow it got switched to a String.

    ReplyDelete
  2. No, it turns out it was not a change in the SifterAPI, see this post on SifterAPI Google Groups Support.

    ReplyDelete
  3. So I believe that issue is that the method JSONObject.getString() is coercing the sentinel JSONObject.NULL to String "null" but that doesn't explain why I thought it was working before. Obviously at some point I should try an older commit and see if it did really work or not, and why.

    ReplyDelete

Fork me on GitHub