]> git.wh0rd.org Git - tt-rss.git/commitdiff
various category/feed id clash fixes
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 1 Aug 2006 12:53:41 +0000 (13:53 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 1 Aug 2006 12:53:41 +0000 (13:53 +0100)
feedlist.js
functions.js
functions.php
tt-rss.js

index 7729da92152367221c8b73e536c52b66110dd27f..4795b16efe6650ccf0c5b9458f394f58507b0204 100644 (file)
@@ -2,10 +2,10 @@ var xmlhttp = Ajax.getTransport();
 
 function viewCategory(cat) {
        getMainContext().active_feed_is_cat = true;
-       viewfeed(cat, 0, '', false, true);
+       viewfeed(cat, '', true);
 }
 
-function viewfeed(feed, skip, subop, doc, is_cat, subop_param) {
+function viewfeed(feed, subop, is_cat, subop_param) {
        try {
        
                enableHotkeys();
@@ -40,7 +40,7 @@ function viewfeed(feed, skip, subop, doc, is_cat, subop_param) {
                        parent.closeInfoBox(true);
                }
 
-               debug("CVMODE: " + activeFeedIsCat());
+               debug("IS_CAT_STORED: " + activeFeedIsCat() + ", IS_CAT: " + is_cat);
 
                var fe = document.getElementById("FEEDR-" + getActiveFeedId());
 
@@ -50,7 +50,9 @@ function viewfeed(feed, skip, subop, doc, is_cat, subop_param) {
 
                setActiveFeedId(feed);
        
-               getMainContext().active_feed_is_cat = is_cat;
+               if (is_cat != undefined) {
+                       getMainContext().active_feed_is_cat = is_cat;
+               }
 
                if (subop == "MarkAllRead") {
 
index 08dcfc66b0ac1c5f21d25f9f22f1af28ea0f3ef1..ed8340444ead65ab4b976eb3a9ffec0c81bf7b51 100644 (file)
@@ -187,7 +187,7 @@ function hotkey_handler(e) {
 
                if (keycode == 85) { // u
                        if (getActiveFeedId()) {
-                               return f_ctx.viewfeed(getActiveFeedId(), 0, "ForceUpdate");
+                               return f_ctx.viewfeed(getActiveFeedId(), "ForceUpdate");
                        }
                }
        
@@ -201,13 +201,13 @@ function hotkey_handler(e) {
                if (keycode == 74) { // j
                        var feed = getActiveFeedId();
                        var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
-                       if (new_feed) viewfeed(new_feed, 0, '');
+                       if (new_feed) viewfeed(new_feed, '');
                }
        
                if (keycode == 75) { // k
                        var feed = getActiveFeedId();
                        var new_feed = getRelativeFeedId(feedlist, feed, 'next');
-                       if (new_feed) viewfeed(new_feed, 0, '');
+                       if (new_feed) viewfeed(new_feed, '');
                }
 
                if (keycode == 78 || keycode == 40) { // n, down
index 0a3d3f0f52b0b1e126e1a7c1b31e7d456cb50c85..af9cd222fff6512c85ecc70fbb8100a117466e94 100644 (file)
                        $link_title = "Updated: $last_updated";
                }
 
-               $feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" href=\"javascript:viewfeed('$feed_id', 0);\">$feed_title</a>";
+               $feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" href=\"javascript:viewfeed('$feed_id', '', false);\">$feed_title</a>";
 
                print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
                if (get_pref($link, 'ENABLE_FEED_ICONS')) {
index 0f45c8060032118574e9160c0b29ce5b3e3d2d8b..9ac5220fea88ecca931b6d4d2e4b298101b21083 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -239,20 +239,20 @@ function catchupAllFeeds() {
 
 }
 
-function viewCurrentFeed(skip, subop) {
+function viewCurrentFeed(subop) {
 
        if (getActiveFeedId()) {
-               viewfeed(getActiveFeedId(), skip, subop);
+               viewfeed(getActiveFeedId(), subop);
        } else {
                disableContainerChildren("headlinesToolbar", false, document);
-               viewfeed(-1, skip, subop); // FIXME
+               viewfeed(-1, subop); // FIXME
        }
        return false; // block unneeded form submits
 }
 
-function viewfeed(feed, skip, subop) {
+function viewfeed(feed, subop) {
        var f = window.frames["feeds-frame"];
-       f.viewfeed(feed, skip, subop);
+       f.viewfeed(feed, subop);
 }
 
 function timeout() {
@@ -270,7 +270,7 @@ function resetSearch() {
 
        if (searchbox.value != "" && getActiveFeedId()) {       
                searchbox.value = "";
-               viewfeed(getActiveFeedId(), 0, "");
+               viewfeed(getActiveFeedId(), "");
        }
 }