diff options
author | Andrew Dolgov <[email protected]> | 2015-07-12 12:01:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-07-12 12:01:34 +0300 |
commit | 34440201006344012ed01e37f883f2f0c11fcba7 (patch) | |
tree | 0996cf30ba290902cd6f3990215e399dbd9a72b2 /js | |
parent | 1727ceabca4e1d71cb5412946fcd94c3e3ea6196 (diff) |
report top id changed in headlines buffer
Diffstat (limited to 'js')
-rw-r--r-- | js/viewfeed.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/js/viewfeed.js b/js/viewfeed.js index 8bc42aadc..b4bf69a7e 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -184,10 +184,22 @@ function headlines_callback2(transport, offset, background, infscroll_req) { } else { console.log("no new headlines received"); + var top_id_changed = reply['headlines']['top_id_changed']; + console.log("top id changed:" + top_id_changed); + var hsp = $("headlines-spacer"); - if (hsp) hsp.innerHTML = "<a href='#' onclick='openNextUnreadFeed()'>" + - __("Click to open next unread feed.") + "</a>"; + if (hsp) { + if (top_id_changed) { + hsp.innerHTML = "<a href='#' onclick='viewCurrentFeed()'>" + + __("New articles found, reload feed to continue.") + "</a>"; + } else { + hsp.innerHTML = "<a href='#' onclick='openNextUnreadFeed()'>" + + __("Click to open next unread feed.") + "</a>"; + } + + } + } } @@ -1325,13 +1337,14 @@ function headlines_scroll_handler(e) { return; } - } else { - if (hsp) + /*} else { + if (hsp) { if (_infscroll_disable) hsp.innerHTML = "<a href='#' onclick='openNextUnreadFeed()'>" + __("Click to open next unread feed.") + "</a>"; else hsp.innerHTML = ""; + }*/ } if (isCdmMode()) { |