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

show current unread counter on headlines toolbar if sidebar is hidden

This commit is contained in:
Andrew Dolgov
2019-12-12 07:37:28 +03:00
parent 0a10832491
commit 9c0235ab66
10 changed files with 72 additions and 12 deletions

View File

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