diff options
author | Andrew Dolgov <[email protected]> | 2010-09-13 15:40:35 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-09-13 15:40:49 +0400 |
commit | d5ed5446d13807ff4a737a059a695d0ef0f97217 (patch) | |
tree | b81b41f8092732e0a063cadd63cf6d83245c3025 /feedlist.js | |
parent | 4a3da1c8eff80c15f66029c007f83e002e5b3260 (diff) |
functions: code cleanup
Diffstat (limited to 'feedlist.js')
-rw-r--r-- | feedlist.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/feedlist.js b/feedlist.js index 8860424b1..3d9acafd1 100644 --- a/feedlist.js +++ b/feedlist.js @@ -163,14 +163,22 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { var feedlist = $('feedList'); - var next_unread_feed = getRelativeFeedId(feedlist, - feed, "next", true); - + var next_unread_feed = getRelativeFeedId2(feed, false, + "next", true); + + /* gRFI2 also returns categories which we don't really + * need here, so we skip them */ + + while (next_unread_feed && next_unread_feed.match("CAT:")) + next_unread_feed = getRelativeFeedId2( + next_unread_feed.replace("CAT:", ""), + true, "next", true); + if (!next_unread_feed) { - next_unread_feed = getRelativeFeedId(feedlist, - -3, "next", true); + next_unread_feed = getRelativeFeedId2(-3, true, + "next", true); } - + if (next_unread_feed) { query = query + "&nuf=" + param_escape(next_unread_feed); //setActiveFeedId(next_unread_feed); |