Added config option to disregard joins/parts from unread message counter.
authorTony Lechner <tony.lechner@gmail.com>
Thu, 5 Dec 2013 04:41:05 +0000 (22:41 -0600)
committerTony Lechner <tony.lechner@gmail.com>
Thu, 5 Dec 2013 04:41:05 +0000 (22:41 -0600)
client/src/views/channel.js
config.example.js

index f8d3b86b0268978d541ef6e1c2b99c59cd02c1b4..c4d762bddb4b3cf99eb53a8cd644e7ed0e014950 100644 (file)
@@ -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 {
index b68cfd577cc88404be84f981cc5a1cc77bddb509..c07855a632a8e450fb534c09aae70d23974345d6 100644 (file)
@@ -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'
 };