1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:25:54 +00:00

feed tree: only run animation for appearing unread counters to prevent clashes with aux counter updating and animations ending up in wrong state

This commit is contained in:
Andrew Dolgov
2017-01-22 20:20:35 +03:00
parent 3bc1b53772
commit 70c5b2bfcc
2 changed files with 5 additions and 3 deletions

View File

@@ -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");