mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:45:55 +00:00
unify child category counter display; remove include_children control
This commit is contained in:
@@ -179,7 +179,6 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
|
||||
}
|
||||
|
||||
query += "&cat=" + is_cat;
|
||||
query += "&include_children=" + dijit.byId("include_children").attr("checked");
|
||||
|
||||
console.log(query);
|
||||
|
||||
@@ -296,7 +295,6 @@ function parse_counters(elems, scheduled_call) {
|
||||
var error = elems[l].error;
|
||||
var has_img = elems[l].has_img;
|
||||
var updated = elems[l].updated;
|
||||
var child_unread = parseInt(elems[l].child_counter);
|
||||
|
||||
if (id == "global-unread") {
|
||||
global_unread = ctr;
|
||||
@@ -317,7 +315,7 @@ function parse_counters(elems, scheduled_call) {
|
||||
}
|
||||
|
||||
if (getFeedUnread(id, (kind == "cat")) != ctr ||
|
||||
(kind == "cat" && getCatParam(id) != child_unread)) {
|
||||
(kind == "cat")) {
|
||||
|
||||
cache_delete("feed:" + id + ":" + (kind == "cat"));
|
||||
}
|
||||
@@ -336,8 +334,6 @@ function parse_counters(elems, scheduled_call) {
|
||||
setFeedIcon(id, false, 'images/blank_icon.gif');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setCatParam(id, child_unread);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,27 +423,6 @@ function setFeedValue(feed, is_cat, key, value) {
|
||||
}
|
||||
}
|
||||
|
||||
function setCatParam(cat, value) {
|
||||
try {
|
||||
var tree = dijit.byId("feedTree");
|
||||
|
||||
if (tree && tree.model)
|
||||
return tree.setCatParam(cat, value);
|
||||
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
function getCatParam(cat) {
|
||||
try {
|
||||
return getFeedValue(cat, true, "child_unread");
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function selectFeed(feed, is_cat) {
|
||||
try {
|
||||
var tree = dijit.byId("feedTree");
|
||||
@@ -581,11 +556,6 @@ function catchupFeed(feed, is_cat) {
|
||||
|
||||
function decrementFeedCounter(feed, is_cat) {
|
||||
try {
|
||||
// we have subcats, no way to figure out if this article is
|
||||
// actually from this category
|
||||
if (is_cat && getCatParam(feed) > 0)
|
||||
return;
|
||||
|
||||
var ctr = getFeedUnread(feed, is_cat);
|
||||
|
||||
if (ctr > 0) {
|
||||
|
||||
Reference in New Issue
Block a user