From 223d53e51047215809988cd26c94e4e82c1ee9e6 Mon Sep 17 00:00:00 2001 From: Tony Lechner Date: Wed, 4 Dec 2013 22:41:05 -0600 Subject: [PATCH] Added config option to disregard joins/parts from unread message counter. --- client/src/views/channel.js | 12 +++++++++++- config.example.js | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/src/views/channel.js b/client/src/views/channel.js index f8d3b86..c4d762b 100644 --- a/client/src/views/channel.js +++ b/client/src/views/channel.js @@ -180,7 +180,17 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({ if (this.model.isActive()) return; var $act = this.model.tab.find('.activity'); - $act.text((parseInt($act.text(), 10) || 0) + 1); + var count_joins_parts = _kiwi.global.settings.get('count_joins_parts'); + if (typeof count_joins_parts === 'undefined') { + count_joins_parts = true; + } + + if (count_joins_parts || msg.type === 'privmsg') { + $act.text((parseInt($act.text(), 10) || 0) + 1); + } else { + $act.text((parseInt($act.text(), 10) || 0)); + } + if ($act.text() === '0') { $act.addClass('zero'); } else { diff --git a/config.example.js b/config.example.js index b68cfd5..c07855a 100644 --- a/config.example.js +++ b/config.example.js @@ -182,7 +182,8 @@ conf.client = { show_joins_parts: true, show_timestamps: false, mute_sounds: false, - show_emoticons: true + show_emoticons: true, + count_joins_parts: true }, window_title: 'Kiwi IRC' }; -- 2.25.1