diff --git a/index.html b/index.html index 996975e..bafb2e8 100644 --- a/index.html +++ b/index.html @@ -220,6 +220,9 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel brand + {{unread}} + {{notifications}} +
diff --git a/js/glowingbear.js b/js/glowingbear.js index fa03b2f..9660570 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -209,6 +209,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', ); } notifications.updateTitle(ab); + $scope.notifications = notifications.unreadCount('notification'); + $scope.unread = notifications.unreadCount('unread'); $timeout(function() { $rootScope.scrollWithBuffer(true); @@ -233,9 +235,13 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }); $rootScope.favico = new Favico({animation: 'none'}); + $scope.notifications = notifications.unreadCount('notification'); + $scope.unread = notifications.unreadCount('unread'); $rootScope.$on('notificationChanged', function() { notifications.updateTitle(); + $scope.notifications = notifications.unreadCount('notification'); + $scope.unread = notifications.unreadCount('unread'); if (settings.useFavico && $rootScope.favico) { notifications.updateFavico(); diff --git a/js/notifications.js b/js/notifications.js index 739a651..2caca39 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -157,5 +157,6 @@ weechat.factory('notifications', ['$rootScope', '$log', 'models', 'settings', fu updateFavico: updateFavico, createHighlight: createHighlight, cancelAll: cancelAll, + unreadCount: unreadCount }; }]);