diff --git a/assets/js/app.js b/assets/js/app.js index 3cca31c..c32e7de 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -171,6 +171,12 @@ { var item = document.getElementById("item-" + item_id); if (item) item.parentNode.removeChild(item); + + var $unread_span = document.getElementById("unread-count"); + var unread_count = parseInt($unread_span.innerHTML, 10) - 1; + + $unread_span.innerHTML = unread_count; + document.querySelector("title").innerHTML = "miniflux (" + unread_count + ")"; } diff --git a/templates/unread_items.php b/templates/unread_items.php index 02ee0e2..86e8e81 100644 --- a/templates/unread_items.php +++ b/templates/unread_items.php @@ -5,7 +5,7 @@