summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-12 12:01:34 +0300
committerAndrew Dolgov <[email protected]>2015-07-12 12:01:34 +0300
commit34440201006344012ed01e37f883f2f0c11fcba7 (patch)
tree0996cf30ba290902cd6f3990215e399dbd9a72b2 /js
parent1727ceabca4e1d71cb5412946fcd94c3e3ea6196 (diff)
report top id changed in headlines buffer
Diffstat (limited to 'js')
-rw-r--r--js/viewfeed.js21
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()) {