dideler/brocku-reddit-for-chrome — Issue #2: Refresh timer does not work
Author: dideler
Created: 2012-02-23 07:38:07+00:00
State: open

**Expected:**
An auto refresh is supposed to happen every so often depending on the user-set interval. E.g. every 15 minutes.

**Actual:**
No auto refresh. Upon inspection, the lastRefresh item in localStorage is abnormally large, so the current time will always be less than the next update time and no update would happen.

The lastRefresh time is too large because the retry time (used when an update fails) is appended rather than added. This is because the '+' operator acts as concatenation since lastRefresh is returned as a string. To fix, simply parse it as a float before adding the retry time.