1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-29 11:31:28 +00:00

add an option to disable conditional counters

This commit is contained in:
Andrew Dolgov
2021-02-27 11:25:07 +03:00
parent c1cd3324e3
commit 5edcbf2e9b
3 changed files with 6 additions and 1 deletions

View File

@@ -121,7 +121,8 @@ class RPC extends Handler_Protected {
else
$label_ids = array_map("intval", clean($_REQUEST["label_ids"] ?? []));
$counters = is_array($feed_ids) ? Counters::get_conditional($feed_ids, $label_ids) : Counters::get_all();
$counters = is_array($feed_ids) && !get_pref(Prefs::DISABLE_CONDITIONAL_COUNTERS) ?
Counters::get_conditional($feed_ids, $label_ids) : Counters::get_all();
$reply = [
'counters' => $counters,