diff options
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-x | js/Headlines.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/Headlines.js b/js/Headlines.js index 05de3a0e9..473a137f8 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -546,6 +546,16 @@ define(["dojo/_base/declare"], function (declare) { return tmp.firstChild; }, + updateCurrentUnread: function() { + const feed_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat()); + + if (feed_unread > 0 && !Element.visible("feeds-holder")) { + $("feed_current_unread").innerText = feed_unread; + Element.show("feed_current_unread"); + } else { + Element.hide("feed_current_unread"); + } + }, onLoaded: function (transport, offset, append) { const reply = App.handleRpcJson(transport); @@ -648,6 +658,8 @@ define(["dojo/_base/declare"], function (declare) { "</span>"; } + Headlines.updateCurrentUnread(); + } else if (headlines_count > 0 && feed_id == Feeds.getActive() && is_cat == Feeds.activeIsCat()) { const c = dijit.byId("headlines-frame"); |