EvansGmail / Ketamine-to-a-midget

1 stars 0 forks source link

Some cached posts aren't being found by getComment #23

Closed EvansGmail closed 9 years ago

EvansGmail commented 9 years ago

To reproduce the issue, hit G to scrape NoNy's posts, and choose the post on page 313 of a Heroes thread. Then navigate backwards to the beginning of that page. Page 312 is already cached due to another comment, but the console throws an exception when trying to read the last comment.

EvansGmail commented 9 years ago

It seems grabPostAndCachePage() is running, and returning null for this post. The page has been cached, but for some reason is scraping again, which I need to look into.

Even if it's scraping again, it should return the correct post, otherwise I will run into trouble once I trigger RipeForRefresh.

EvansGmail commented 9 years ago

grabPostAndCachePage() now returns the correct post, even when re-scraping a previously cached page.

The page is still being re-scraped when it should be cached.

EvansGmail commented 9 years ago

Fixed! I just forgot to set ripeForRefresh to false when caching Previous and Next pages. Should I do that in getCachedPage?