ソースを参照

Fixes #274 Roster filtering results change with presence changes

JC Brand 10 年 前
コミット
3d6d14c47d
2 ファイル変更5 行追加2 行削除
  1. 4 2
      converse.js
  2. 1 0
      docs/CHANGES.rst

+ 4 - 2
converse.js

@@ -4050,9 +4050,10 @@
 
             liveFilter: _.debounce(function (ev) {
                 if (ev && ev.preventDefault) { ev.preventDefault(); }
-                var q = ev.target.value;
+                var $filter = this.$('.roster-filter');
+                var q = $filter.val();
                 var t = this.$('.filter-type').val();
-                $(ev.target)[this.tog(q)]('x');
+                $filter[this.tog(q)]('x');
                 this.filter(q, t);
             }, 300),
 
@@ -4157,6 +4158,7 @@
                 if (_.has(contact.changed, 'subscription') && contact.changed.requesting == 'true') {
                     this.addContactToGroup(contact, HEADER_REQUESTING_CONTACTS);
                 }
+                this.liveFilter();
             },
 
             updateChatBox: function (contact) {

+ 1 - 0
docs/CHANGES.rst

@@ -19,6 +19,7 @@ Changelog
 * #251 Non-minified builds for debugging. [jcbrand]
 * #264 Remove unnecessary commas for ie8 compatibility. [Deuteu]
 * #267 Unread messages counter wrongly gets incremented by chat state notifications. [Deuteu]
+* #274 Roster filtering results change with presence changes. [jcbrand]
 * #275 Custom status message doesn't reset. [jcbrand]
 * #278 Unread messages counter doesn't unbind it's events. [Deuteu]
 * #279 Handle more field types for MUC config forms. [gbonvehi]