From 6a4593ef869192881914224b39740fa8d4eb7f5d Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Mon, 7 Oct 2013 11:18:44 +0200 Subject: [PATCH] Fix the unread integer --- js/websockets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/websockets.js b/js/websockets.js index c7c27c0..117b9b0 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -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) {