summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-01-03 10:47:41 +0300
committerAndrew Dolgov <[email protected]>2019-01-03 10:47:41 +0300
commit0517b88cce4d6c0f855b8f7c5471d5ef819c845b (patch)
treeb2680e8d484dd138eae93de18cac7a50f2b2d35b /classes/rpc.php
parentf44c6d01b005731ee004e26e857eaaed5b9db0de (diff)
rpc, catchupfeed: return counters immediately so that frontend can figure out next unread feed correctly
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-xclasses/rpc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index b2184d8ec..7220e10ea 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -424,7 +424,10 @@ class RPC extends Handler_Protected {
Feeds::catchup_feed($feed_id, $is_cat, false, $mode, [$search_query, $search_lang]);
- print json_encode(array("message" => "UPDATE_COUNTERS"));
+ // return counters here synchronously so that frontend can figure out next unread feed properly
+ print json_encode(['counters' => Counters::getAllCounters()]);
+
+ //print json_encode(array("message" => "UPDATE_COUNTERS"));
}
function setpanelmode() {
@@ -620,4 +623,4 @@ class RPC extends Handler_Protected {
print json_encode($rv);
}
-} \ No newline at end of file
+}