From 34440201006344012ed01e37f883f2f0c11fcba7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 12 Jul 2015 12:01:34 +0300 Subject: report top id changed in headlines buffer --- js/viewfeed.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'js/viewfeed.js') 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 = "" + - __("Click to open next unread feed.") + ""; + if (hsp) { + if (top_id_changed) { + hsp.innerHTML = "" + + __("New articles found, reload feed to continue.") + ""; + } else { + hsp.innerHTML = "" + + __("Click to open next unread feed.") + ""; + } + + } + } } @@ -1325,13 +1337,14 @@ function headlines_scroll_handler(e) { return; } - } else { - if (hsp) + /*} else { + if (hsp) { if (_infscroll_disable) hsp.innerHTML = "" + __("Click to open next unread feed.") + ""; else hsp.innerHTML = ""; + }*/ } if (isCdmMode()) { -- cgit v1.2.3-54-g00ecf