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

request label counters conditionally

This commit is contained in:
Andrew Dolgov
2021-02-24 15:07:31 +03:00
parent 9313ebf2e7
commit 553548b689
7 changed files with 159 additions and 70 deletions

View File

@@ -133,10 +133,15 @@ const Feeds = {
this._search_query = "";
this.reloadCurrent();
},
requestCounters: function(feed_ids = null) {
xhr.json("backend.php", {op: "rpc", method: "getAllCounters", "feed_ids[]": feed_ids, seq: App.next_seq()}, () => {
//
});
// null = get all data, [] would give empty response for specific type
requestCounters: function(feed_ids = null, label_ids = null) {
xhr.json("backend.php", {op: "rpc",
method: "getAllCounters",
"feed_ids[]": feed_ids,
"feed_id_count": feed_ids ? feed_ids.length : -1,
"label_ids[]": label_ids,
"label_id_count": label_ids ? label_ids.length : -1,
seq: App.next_seq()});
},
reload: function() {
try {