From: Andrew Dolgov Date: Tue, 9 Nov 2010 12:45:14 +0000 (+0300) Subject: resort_feedlist: fix glitch caused by FEEDR-0 X-Git-Tag: 1.5.0~338 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bc05c3d19cfb87f3cb0462564b4606ea4273cecf;p=tt-rss.git resort_feedlist: fix glitch caused by FEEDR-0 --- diff --git a/functions.js b/functions.js index 4942b50c..9e990c44 100644 --- a/functions.js +++ b/functions.js @@ -650,8 +650,10 @@ function resort_category(node, cat_mode) { var tmp_name = get_feed_entry_name(list[i]); var cur_name = get_feed_entry_name(list[j]); - var valid_pair = cat_mode || (list[i].id.match(/FEEDR-[0-9]/) && - list[j].id.match(/FEEDR-[0-9]/)); + /* we don't want to match FEEDR-0 - e.g. Archived articles */ + + var valid_pair = cat_mode || (list[i].id.match(/FEEDR-[1-9]/) && + list[j].id.match(/FEEDR-[1-9]/)); if (valid_pair && ((by_unread && (cur_val > tmp_val)) || (!by_unread && (cur_name < tmp_name)))) { tempnode_i = list[i].cloneNode(true);