summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-22 20:20:35 +0300
committerAndrew Dolgov <[email protected]>2017-01-22 20:20:35 +0300
commit70c5b2bfcc766c82c697e431371be308ebad11dc (patch)
tree29387c9eef2e7634bd4b51debf0c2d3e7906441a
parent3bc1b53772231e37b3264ca24ca31a69dc3c59cd (diff)
feed tree: only run animation for appearing unread counters to prevent clashes with aux counter updating and animations ending up in wrong state
-rw-r--r--include/functions.php2
-rw-r--r--js/FeedTree.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/functions.php b/include/functions.php
index 17bd9f371..30b9b293a 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1583,7 +1583,7 @@
$cv = array("id" => $i,
"counter" => (int) $count,
- "auxcounter" => $auxctr);
+ "auxcounter" => (int) $auxctr);
// if (get_pref('EXTENDED_FEEDLIST'))
// $cv["xmsg"] = getFeedArticles($i)." ".__("total");
diff --git a/js/FeedTree.js b/js/FeedTree.js
index a78537fea..336f2b5f0 100644
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -238,8 +238,10 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
ctr = node.counterNode;
ctr.innerHTML = item.unread > 0 ? item.unread : item.auxcounter;
item.unread > 0 || item.auxcounter > 0 ?
- Effect.Appear(ctr, {duration : 0.3,
- queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+ item.unread > 0 ?
+ Effect.Appear(ctr, {duration : 0.3,
+ queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+ Element.show(ctr) :
Element.hide(ctr);
item.unread == 0 && item.auxcounter > 0 ? ctr.addClassName("aux") : ctr.removeClassName("aux");