summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feedlist.js2
-rw-r--r--functions.js6
-rw-r--r--functions.php45
-rw-r--r--modules/backend-rpc.php7
-rw-r--r--tt-rss.js4
5 files changed, 44 insertions, 20 deletions
diff --git a/feedlist.js b/feedlist.js
index d324c6a80..caffc9387 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -184,7 +184,7 @@ function feedlist_init() {
if (getActiveFeedId()) {
debug("some feed is open on feedlist refresh, reloading");
setTimeout("viewCurrentFeed()", 100);
- }
+ }
} catch (e) {
exception_error("feedlist/init", e);
diff --git a/functions.js b/functions.js
index a3a46a9c9..bde6098a3 100644
--- a/functions.js
+++ b/functions.js
@@ -782,6 +782,12 @@ function update_all_counters(feed) {
query = query + "&aid=" + feed;
}
+ if (tagsAreDisplayed()) {
+ query = query + "&omode=lt";
+ }
+
+ debug("update_all_counters QUERY: " + query);
+
xmlhttp_rpc.open("GET", query, true);
xmlhttp_rpc.onreadystatechange=all_counters_callback;
xmlhttp_rpc.send(null);
diff --git a/functions.php b/functions.php
index 7b5da022c..84b863e70 100644
--- a/functions.php
+++ b/functions.php
@@ -1480,13 +1480,26 @@
}
}
- function getAllCounters($link) {
- getLabelCounters($link);
+ function getAllCounters($link, $omode = "tflc") {
+/* getLabelCounters($link);
getFeedCounters($link);
getTagCounters($link);
getGlobalCounters($link);
if (get_pref($link, 'ENABLE_FEED_CATS')) {
getCategoryCounters($link);
+ } */
+
+ if (!$omode) $omode = "tflc";
+
+ getGlobalCounters($link);
+
+ if (strchr($omode, "l")) getLabelCounters($link);
+ if (strchr($omode, "f")) getFeedCounters($link);
+ if (strchr($omode, "t")) getTagCounters($link);
+ if (strchr($omode, "c")) {
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
}
}
@@ -2727,27 +2740,27 @@
$owner_uid = $_SESSION["uid"];
- if (!$tags) {
+ /* virtual feeds */
- /* virtual feeds */
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ print "<li class=\"feedCat\">Special</li>";
+ print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
+ }
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "<li class=\"feedCat\">Special</li>";
- print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
- }
+ $num_starred = getFeedUnread($link, -1);
- $num_starred = getFeedUnread($link, -1);
+ $class = "virt";
- $class = "virt";
+ if ($num_starred > 0) $class .= "Unread";
- if ($num_starred > 0) $class .= "Unread";
+ printFeedEntry(-1, $class, "Starred articles", $num_starred,
+ "images/mark_set.png", $link);
- printFeedEntry(-1, $class, "Starred articles", $num_starred,
- "images/mark_set.png", $link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ print "</ul>\n";
+ }
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "</ul>\n";
- }
+ if (!$tags) {
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 153590589..3cba704e3 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -42,9 +42,12 @@
}
if ($subop == "getAllCounters") {
- print "<rpc-reply>";
+ print "<rpc-reply>";
print "<counters>";
- getAllCounters($link);
+
+ $omode = $_GET["omode"];
+
+ getAllCounters($link, $omode);
print "</counters>";
print_runtime_info($link);
print "</rpc-reply>";
diff --git a/tt-rss.js b/tt-rss.js
index 85616b4f3..533dd4f13 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -154,7 +154,7 @@ function scheduleFeedUpdate(force) {
omode = "T";
} else {
if (display_tags) {
- omode = "t";
+ omode = "tl";
} else {
omode = "flc";
}
@@ -190,6 +190,8 @@ function updateFeedList(silent, fetch) {
// notify("Loading feed list...");
// }
+ debug("<b>updateFeedList</b>");
+
var query_str = "backend.php?op=feeds";
if (display_tags) {