]> git.wh0rd.org Git - tt-rss.git/commitdiff
parse_counters: cache feedlist after update (2)
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 13:36:37 +0000 (16:36 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 13:36:37 +0000 (16:36 +0300)
functions.js
tt-rss.js

index 6cff3eacdf1685a262c34e426d760c45a6975da9..786023ffea0b86326d7a9fd070dd6c139efbeacc 100644 (file)
@@ -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) {
index 6048de057fab31e560f28d8a97a47ad44408c393..1dd79c5f727c6339a1aef45569af5a2df3e01d96 100644 (file)
--- 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);
                }