]> git.wh0rd.org Git - tt-rss.git/commitdiff
feedlist forgot about active feed highlight on refetch
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 6 Sep 2005 04:33:50 +0000 (05:33 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 6 Sep 2005 04:33:50 +0000 (05:33 +0100)
tt-rss.js

index 9b9decf81bc64851c66c4eb52f42234769a49126..6857be5b0ffbd98316e672ae19eddcd54f3b3824 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -48,6 +48,9 @@ function feedlist_callback() {
 
                if (first_run) {
                        scheduleFeedUpdate(false);
+                       if (getCookie("ttrss_vf_actfeed")) {
+                               viewfeed(getCookie("ttrss_vf_actfeed"), 0, "");
+                       }
                        first_run = false;
                } else {
                        notify("");
@@ -62,6 +65,14 @@ function refetch_callback() {
                var container = document.getElementById('feeds');
                container.innerHTML = xmlhttp_rpc.responseText;
                document.title = "Tiny Tiny RSS";
+
+               cleanSelected("feedsList");
+               
+               var feedr = document.getElementById("FEEDR-" + active_feed_id);
+               if (feedr) {
+                       feedr.className = feedr.className + "Selected";
+               }
+
        } 
 }
 
@@ -276,10 +287,11 @@ function viewfeed(feed, skip, subop) {
        
        headlines_frame.src = query + "&addheader=true";
 
-       var feedr = document.getElementById("FEEDR-" + feed);
-
        cleanSelected("feedsList");
-       feedr.className = feedr.className + "Selected";
+       var feedr = document.getElementById("FEEDR-" + feed);
+       if (feedr) {
+               feedr.className = feedr.className + "Selected";
+       }
        
        disableContainerChildren("headlinesToolbar", false);
 
@@ -416,10 +428,6 @@ function init() {
                viewbox.value = getCookie("ttrss_vf_vmode");
        }
 
-       if (getCookie("ttrss_vf_actfeed")) {
-               viewfeed(getCookie("ttrss_vf_actfeed"), 0, "");
-       }
-               
 }