ソースを参照

Fix timing bug with minimized_chats not being available in time

JC Brand 9 年 前
コミット
49d58d321c
1 ファイル変更7 行追加6 行削除
  1. 7 6
      src/converse-minimize.js

+ 7 - 6
src/converse-minimize.js

@@ -40,6 +40,13 @@
                 return this;
             },
 
+            onConnected: function () {
+                converse.minimized_chats = new converse.MinimizedChats({
+                    model: converse.chatboxes
+                });
+                this._super.onConnected.apply(this, arguments);
+            },
+
             registerGlobalEventHandlers: function () {
                 this._super.registerGlobalEventHandlers.apply(this, arguments);
 
@@ -352,12 +359,6 @@
                 }
             });
 
-            var onLogin = function () {
-                converse.minimized_chats = new converse.MinimizedChats({
-                    model: converse.chatboxes
-                });
-            };
-            converse.on('ready', onLogin);
             converse.on('controlBoxOpened', function (evt, chatbox) {
                 // Wrapped in anon method because at scan time, chatboxviews
                 // attr not set yet.