Only update title for notifications, not other kinds of activity

Also make the unread count the first thing in the title
This commit is contained in:
Lorenz Hübschle-Schneider 2014-02-21 10:22:27 +00:00
commit df1bb08749
2 changed files with 4 additions and 8 deletions

View file

@ -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() {