]> git.wh0rd.org - tt-rss.git/commitdiff
another implementation of pull 386 (show next when finished reading)
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 25 Jul 2014 08:14:06 +0000 (12:14 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 25 Jul 2014 08:14:06 +0000 (12:14 +0400)
js/viewfeed.js

index 9672c47ba6acdebbf5998d6f8b5fdc34992f0c67..846c87a8f39ec8c7af0cf1bee530af026fe6a468 100644 (file)
@@ -1350,6 +1350,21 @@ function headlines_scroll_handler(e) {
                                        catchup_timeout_id = window.setTimeout('catchupBatchedArticles()',
                                                500);
                                }
+                       } else if (_infscroll_disable) {
+                               var child = $$("#headlines-frame div[id*=RROW]").last();
+
+                               if (child && $("headlines-frame").scrollTop >
+                                               (child.offsetTop + child.offsetHeight/2)) {
+
+                                       console.log("we seem to be at an end");
+
+                                       if (getInitParam("on_catchup_show_next_feed") == "1") {
+                                               var is_cat = activeFeedIsCat();
+                                               var nuf = getNextUnreadFeed(getActiveFeedId(), is_cat);
+
+                                               if (nuf) viewfeed(nuf, '', is_cat);
+                                       }
+                               }
                        }
                }