1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

report top id changed in headlines buffer

This commit is contained in:
Andrew Dolgov
2015-07-12 12:01:34 +03:00
parent 1727ceabca
commit 3444020100
4 changed files with 98 additions and 78 deletions

View File

@@ -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()) {