From e903acfb0df9d9b39f98d81d77897ea6d7176996 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Thu, 11 Aug 2016 14:08:07 +0200 Subject: [PATCH] Fix notification count update --- js/handlers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/handlers.js b/js/handlers.js index 2fd552e..960b368 100644 --- a/js/handlers.js +++ b/js/handlers.js @@ -359,9 +359,11 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific // 1 is message buffer.unread = l.count[1]; // 2 is private - buffer.notification = l.count[2]; + // Use += so count[2] or count[3] doesn't overwrite each other + buffer.notification += l.count[2]; // 3 is highlight - buffer.notification = l.count[3]; + // Use += so count[2] or count[3] doesn't overwrite each other + buffer.notification += l.count[3]; /* Since there is unread messages, we can guess * what the last read line is and update it accordingly */