From 6358d70d5e1b0954fdc9e7f7481950ef59446036 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 4 Feb 2017 11:57:31 +0300 Subject: [PATCH] reset local counter cache when feed count changes --- js/feedlist.js | 8 ++++++-- js/tt-rss.js | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/js/feedlist.js b/js/feedlist.js index 3a0b7cb12..daba29108 100644 --- a/js/feedlist.js +++ b/js/feedlist.js @@ -13,6 +13,10 @@ var _counters_prev = []; return false; }*/ +function resetCounterCache() { + _counters_prev = []; +} + function loadMoreHeadlines() { try { console.log("loadMoreHeadlines"); @@ -306,10 +310,10 @@ function parse_counters(elems) { continue; } - if (id == "subscribed-feeds") { + /*if (id == "subscribed-feeds") { feeds_found = ctr; continue; - } + }*/ /*if (getFeedUnread(id, (kind == "cat")) != ctr || (kind == "cat")) { diff --git a/js/tt-rss.js b/js/tt-rss.js index 0cbd589bb..36be92f4e 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -55,6 +55,8 @@ function updateFeedList() { // __("Loading, please wait...") + ""; Element.show("feedlistLoading"); + + resetCounterCache(); if (dijit.byId("feedTree")) { dijit.byId("feedTree").destroyRecursive();