From 4f787c67ca0b06aad819783f26013af0e2924d9f Mon Sep 17 00:00:00 2001 From: Kerrick Long Date: Sun, 29 Apr 2012 03:46:51 -0500 Subject: [PATCH] Background.clearCache() does not nuke the subscription cache. --- js/common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/common.js b/js/common.js index 8d711b1..2a4a3a9 100644 --- a/js/common.js +++ b/js/common.js @@ -914,6 +914,7 @@ RedditAPI.prototype.submitLink = function (e, tabId) { */ RedditAPI.prototype.getReddits = function () { reddit.apiTransmit('GET', 'http://' + this.domain + '/reddits/mine.json?app=mh', null, function (response) { + cache.remove('reddits'); cache.set('reddits', response.data.children); return true; }); @@ -941,8 +942,12 @@ function Background() { * @method */ Background.prototype.clearCache = function () { + var oldReddits; + + oldReddits = cache.get('reddits'); cache.removeAll(); button.setBadgeDefaults(); + cache.set('reddits', oldReddits) }; /**