]> git.wh0rd.org Git - tt-rss.git/commitdiff
resort_feedlist: fix glitch caused by FEEDR-0
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Nov 2010 12:45:14 +0000 (15:45 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Nov 2010 12:45:14 +0000 (15:45 +0300)
functions.js

index 4942b50cd552b4b29f9c93d430ebfc7a02cae610..9e990c44799f63f07622c0175c1134b459db722e 100644 (file)
@@ -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);