From 3e2937fc2182e9cba7df4eb6d7427ce2064fb083 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 2 Feb 2009 16:36:37 +0300 Subject: [PATCH] parse_counters: cache feedlist after update (2) --- functions.js | 9 +++++---- tt-rss.js | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/functions.js b/functions.js index 6cff3eac..786023ff 100644 --- a/functions.js +++ b/functions.js @@ -579,10 +579,11 @@ function parse_counters(reply, scheduled_call) { setTimeout('updateFeedList(false, false)', 50); } } else { - cache_invalidate("FEEDLIST"); - cache_inject("FEEDLIST", - document.getElementById("feedList").innerHTML, - getInitParam("num_feeds")); + var fl = document.getElementById("feeds-frame").innerHTML; + if (fl) { + cache_invalidate("FEEDLIST"); + cache_inject("FEEDLIST", fl, getInitParam("num_feeds")); + } } } catch (e) { diff --git a/tt-rss.js b/tt-rss.js index 6048de05..1dd79c5f 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -514,7 +514,11 @@ function init_second_stage() { if (fl) { render_feedlist(fl); - request_counters(); + if (document.getElementById("feedList")) { + request_counters(); + } else { + setTimeout('updateFeedList(false, false)', 50); + } } else { setTimeout('updateFeedList(false, false)', 50); } -- 2.39.5