Przeglądaj źródła

rosterview: When filtering, contacts in closed groups appear.

JC Brand 8 lat temu
rodzic
commit
b1e5cb26a1
2 zmienionych plików z 9 dodań i 3 usunięć
  1. 2 0
      CHANGES.md
  2. 7 3
      src/converse-rosterview.js

+ 2 - 0
CHANGES.md

@@ -32,6 +32,8 @@
 - #866 Add babel in order to support ES2015 syntax [jcbrand]
 
 #### Bugfixes:
+- Roster filter is not shown when all groups are collapsed. [jcbrand]
+- When filtering, contacts in closed groups appear. [jcbrand]
 - Room name wasn't being updated after changing it in the configuration form. [jcbrand]
 - Server disco features were "forgotten" after logging out and then logging in again. [jcbrand]
 - Don't show duplicate sent groupchat messages in Slack chat rooms. [jcbrand]

+ 7 - 3
src/converse-rosterview.js

@@ -819,9 +819,13 @@
                             _.each(matches, (item) => {
                                 this.get(item.get('id')).$el.hide();
                             });
-                            _.each(this.model.contacts.reject(
-                                utils.contains.not('fullname', q)),
-                                (item) => { this.get(item.get('id')).$el.show(); });
+                            if (this.model.get('state') === _converse.OPENED) {
+                                _.each(this.model.contacts.reject(
+                                    utils.contains.not('fullname', q)),
+                                    (item) => {
+                                        this.get(item.get('id')).$el.show();
+                                    });
+                            }
                             this.showIfNecessary();
                         }
                     }