Selaa lähdekoodia

Check the "closed" state of the controlbox

when trimming chats.
JC Brand 9 vuotta sitten
vanhempi
commit
6258cfa089
1 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 8 1
      src/converse-minimize.js

+ 8 - 1
src/converse-minimize.js

@@ -218,7 +218,14 @@
 
                 getShownChats: function () {
                     return this.filter(function (view) {
-                        return (!view.model.get('minimized') && view.$el.is(':visible'));
+                        // The controlbox can take a while to close,
+                        // so we need to check its state. That's why we checked
+                        // the 'closed' state.
+                        return (
+                            !view.model.get('minimized') &&
+                            !view.model.get('closed') &&
+                            view.$el.is(':visible')
+                        );
                     });
                 },