summaryrefslogtreecommitdiff
path: root/js/Feeds.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-24 15:07:31 +0300
committerAndrew Dolgov <[email protected]>2021-02-24 15:07:31 +0300
commit553548b6897f8ef292ab56af9dcc196ef8ee0cb3 (patch)
treefeae3a51d884e216d4d460634024ef7884227b14 /js/Feeds.js
parent9313ebf2e745731263a8e24d19473adb70dfee47 (diff)
request label counters conditionally
Diffstat (limited to 'js/Feeds.js')
-rw-r--r--js/Feeds.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index 5d64b77ee..3767f8b65 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -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 {