summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-24 09:47:26 +0300
committerAndrew Dolgov <[email protected]>2021-02-24 09:47:26 +0300
commitd6203bf3508ba77e3943ddc412eb562edb327f22 (patch)
treeeb0e56ff62add4705c200903d559fa7d3f412acb /js/Headlines.js
parenta42e8aad97b66fd4964263e37a1b40164e495b4c (diff)
try to calculate counters conditionally based on feed ids
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index abb96d4ce..1ba52a6b8 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -7,7 +7,7 @@
const Headlines = {
vgroup_last_feed: undefined,
_headlines_scroll_timeout: 0,
- _observer_counters_timeout: 0,
+ //_observer_counters_timeout: 0,
headlines: [],
current_first_id: 0,
_scroll_reset_timeout: false,
@@ -149,38 +149,38 @@ const Headlines = {
const promises = [];
if (ops.tmark.length != 0)
- promises.push(xhr.post("backend.php",
+ promises.push(xhr.json("backend.php",
{op: "rpc", method: "markSelected", ids: ops.tmark.toString(), cmode: 2}));
if (ops.tpub.length != 0)
- promises.push(xhr.post("backend.php",
+ promises.push(xhr.json("backend.php",
{op: "rpc", method: "publishSelected", ids: ops.tpub.toString(), cmode: 2}));
if (ops.read.length != 0)
- promises.push(xhr.post("backend.php",
+ promises.push(xhr.json("backend.php",
{op: "rpc", method: "catchupSelected", ids: ops.read.toString(), cmode: 0}));
if (ops.unread.length != 0)
- promises.push(xhr.post("backend.php",
+ promises.push(xhr.json("backend.php",
{op: "rpc", method: "catchupSelected", ids: ops.unread.toString(), cmode: 1}));
const scores = Object.keys(ops.rescore);
if (scores.length != 0) {
scores.forEach((score) => {
- promises.push(xhr.post("backend.php",
+ promises.push(xhr.json("backend.php",
{op: "article", method: "setScore", id: ops.rescore[score].toString(), score: score}));
});
}
- if (promises.length > 0)
+ /*if (promises.length > 0)
Promise.all([promises]).then(() => {
window.clearTimeout(this._observer_counters_timeout);
this._observer_counters_timeout = setTimeout(() => {
- Feeds.requestCounters(true);
+ Feeds.requestCounters();
}, 1000);
- });
+ });*/
},
click: function (event, id, in_body) {