From df1bb08749809efd59b21ff83e7227501ff725d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Fri, 21 Feb 2014 10:22:27 +0000 Subject: [PATCH] Only update title for notifications, not other kinds of activity Also make the unread count the first thing in the title --- index.html | 2 +- js/glowingbear.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index fbbecdd..ba8434d 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + diff --git a/js/glowingbear.js b/js/glowingbear.js index 345db48..0c5ca58 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -548,17 +548,13 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', var notifications = $rootScope.unreadCount('notification'); if (notifications > 0) { // New notifications deserve an exclamation mark - unreadFragment = '(' + notifications + '!) '; + $rootScope.notificationStatus = '(' + notifications + ') '; } else { - // No notifications, look for unread messages instead - var unread = $rootScope.unreadCount('unread'); - if (unread > 0) { - unreadFragment = '(' + unread + ') '; - } + $rootScope.notificationStatus = ''; } var activeBuffer = models.getActiveBuffer(); - $rootScope.pageTitle = unreadFragment + activeBuffer.shortName + ' | ' + activeBuffer.title; + $rootScope.pageTitle = activeBuffer.shortName + ' | ' + activeBuffer.title; }; $scope.updateFavico = function() {