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

try to calculate counters conditionally based on feed ids

This commit is contained in:
Andrew Dolgov
2021-02-24 09:47:26 +03:00
parent a42e8aad97
commit d6203bf350
7 changed files with 168 additions and 60 deletions

View File

@@ -133,8 +133,8 @@ const Feeds = {
this._search_query = "";
this.reloadCurrent();
},
requestCounters: function() {
xhr.json("backend.php", {op: "rpc", method: "getAllCounters", seq: App.next_seq()}, () => {
requestCounters: function(feed_ids = null) {
xhr.json("backend.php", {op: "rpc", method: "getAllCounters", feed_ids: feed_ids, seq: App.next_seq()}, () => {
//
});
},
@@ -264,10 +264,10 @@ const Feeds = {
// bw_limit disables timeout() so we request initial counters separately
if (App.getInitParam("bw_limit")) {
this.requestCounters(true);
this.requestCounters();
} else {
setTimeout(() => {
this.requestCounters(true);
this.requestCounters();
setInterval(() => { this.requestCounters(); }, 60 * 1000)
}, 250);
}
@@ -396,7 +396,7 @@ const Feeds = {
Notify.progress("Marking all feeds as read...");
xhr.post("backend.php", {op: "feeds", method: "catchupAll"}, () => {
this.requestCounters(true);
this.requestCounters();
this.reloadCurrent();
});