Fix the unread integer

This commit is contained in:
Tor Hveem 2013-10-07 11:18:44 +02:00
parent 599cf0733f
commit 6a4593ef86
1 changed files with 3 additions and 2 deletions

View File

@ -292,9 +292,10 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($
if (!_isActiveBuffer(buffer) && !initial) {
if ($rootScope.buffers[buffer]['unread'] == '') {
$rootScope.buffers[buffer]['unread'] == 0;
$rootScope.buffers[buffer]['unread'] = 1;
}else {
$rootScope.buffers[buffer]['unread'] = parseInt($rootScope.buffers[buffer]['unread']) + 1;
}
$rootScope.buffers[buffer]['unread'] += 1;
}
if (text[0] != undefined) {