Remove uneeded parseInt

This commit is contained in:
Tor Hveem 2013-10-15 19:08:24 +02:00
parent b2174db197
commit 3a1fb161a7

View file

@ -416,14 +416,14 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope.pageTitle = ab.shortName + ' | ' + ab.title;
});
$rootScope.$on('notificationChanged', function() {
var notifications = _.reduce(models.model.buffers, function(memo, num) { return parseInt(memo||0) + num.notification;});
var notifications = _.reduce(models.model.buffers, function(memo, num) { return (memo||0) + num.notification;});
if (notifications > 0 ) {
$scope.favico = new Favico({
animation:'none'
});
$scope.favico.badge(notifications);
}else {
var unread = _.reduce(models.model.buffers, function(memo, num) { return parseInt(memo||0) + num.unread;});
var unread = _.reduce(models.model.buffers, function(memo, num) { return (memo||0) + num.unread;});
$scope.favico = new Favico({
animation:'none',
bgColor : '#5CB85C',