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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user