|
@@ -52,16 +52,6 @@
|
|
//
|
|
//
|
|
// New functions which don't exist yet can also be added.
|
|
// New functions which don't exist yet can also be added.
|
|
|
|
|
|
- registerGlobalEventHandlers () {
|
|
|
|
- const { _converse } = this.__super__;
|
|
|
|
- window.addEventListener("resize", _.debounce(function (ev) {
|
|
|
|
- if (_converse.connection.connected) {
|
|
|
|
- _converse.chatboxviews.trimChats();
|
|
|
|
- }
|
|
|
|
- }, 200));
|
|
|
|
- return this.__super__.registerGlobalEventHandlers.apply(this, arguments);
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
ChatBox: {
|
|
ChatBox: {
|
|
initialize () {
|
|
initialize () {
|
|
this.__super__.initialize.apply(this, arguments);
|
|
this.__super__.initialize.apply(this, arguments);
|
|
@@ -541,6 +531,15 @@
|
|
_converse.emit('minimizedChatsInitialized');
|
|
_converse.emit('minimizedChatsInitialized');
|
|
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
|
|
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
|
|
|
|
|
|
|
|
+
|
|
|
|
+ _converse.on('registeredGlobalEventHandlers', function () {
|
|
|
|
+ window.addEventListener("resize", _.debounce(function (ev) {
|
|
|
|
+ if (_converse.connection.connected) {
|
|
|
|
+ _converse.chatboxviews.trimChats();
|
|
|
|
+ }
|
|
|
|
+ }, 200));
|
|
|
|
+ });
|
|
|
|
+
|
|
_converse.on('controlBoxOpened', function (chatbox) {
|
|
_converse.on('controlBoxOpened', function (chatbox) {
|
|
// Wrapped in anon method because at scan time, chatboxviews
|
|
// Wrapped in anon method because at scan time, chatboxviews
|
|
// attr not set yet.
|
|
// attr not set yet.
|