1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 02:05:56 +00:00

1. feedtree: show counters for marked articles if view-mode == marked

2. hide/show relevant counter nodes using css
3. cleanup some counter-related code
4. compile default css into light theme to prevent cache-related issues
This commit is contained in:
Andrew Dolgov
2020-02-20 14:14:45 +03:00
parent 5b6d9cee29
commit 60288f02e8
14 changed files with 2069 additions and 79 deletions

View File

@@ -175,6 +175,9 @@ class Counters {
"auxcounter" => (int) $auxctr
];
if ($i == -1)
$cv["markedcounter"] = $auxctr;
array_push($ret, $cv);
}
@@ -205,7 +208,8 @@ class Counters {
$sth = $pdo->prepare("SELECT id,
caption,
SUM(CASE WHEN u1.unread = true THEN 1 ELSE 0 END) AS unread,
SUM(CASE WHEN u1.unread = true THEN 1 ELSE 0 END) AS count_unread,
SUM(CASE WHEN u1.marked = true THEN 1 ELSE 0 END) AS count_marked,
COUNT(u1.unread) AS total
FROM ttrss_labels2 LEFT JOIN ttrss_user_labels2 ON
(ttrss_labels2.id = label_id)
@@ -220,8 +224,9 @@ class Counters {
$cv = [
"id" => $id,
"counter" => (int) $line["unread"],
"auxcounter" => (int) $line["total"]
"counter" => (int) $line["count_unread"],
"auxcounter" => (int) $line["total"],
"markedcounter" => (int) $line["count_marked"]
];
if ($descriptions)

View File

@@ -1393,7 +1393,7 @@ class Pref_Feeds extends Handler_Protected {
$obj['items'] = array();
$obj['name'] = Feeds::getCategoryTitle($cat_id);
$obj['type'] = 'category';
$obj['unread'] = (int) Feeds::getCategoryUnread($cat_id);
$obj['unread'] = -1; //(int) Feeds::getCategoryUnread($cat_id);
$obj['bare_id'] = $cat_id;
return $obj;