From 13c280e7ce47da4d8021cae72e786aada9b802c6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 6 Sep 2005 05:33:50 +0100 Subject: [PATCH] feedlist forgot about active feed highlight on refetch --- tt-rss.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tt-rss.js b/tt-rss.js index 9b9decf8..6857be5b 100644 --- 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, ""); - } - }