From c25aae82b5e634aeb38d9c0a358731dae35dffe3 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Mon, 2 Oct 2017 19:55:08 +0200 Subject: [PATCH] Update title when notifications count has been updated --- src/templates/layout.pug | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/templates/layout.pug b/src/templates/layout.pug index df22bd7..11f6d32 100644 --- a/src/templates/layout.pug +++ b/src/templates/layout.pug @@ -321,6 +321,10 @@ html(lang="en") {% if current_user.is_authenticated %} getNotificationsLoop(); // Check for new notifications in the background + $('body').on('pillar:notifications-total-updated', function(e, notifications_total) { + updateTitle(notifications_total, page_title); + }); + // Resize #notifications and change overflow for scrollbars $(window).on("resize", function() { notificationsResize(); }); {% endif %}