Remove the need to depend on converse-controlbox and converse-chatview

This commit is contained in:
JC Brand 2016-03-14 17:03:14 +00:00
parent 9d9f64b2c3
commit 45bc7f1180

View File

@ -10,9 +10,6 @@
define("converse-minimize", [ define("converse-minimize", [
"converse-core", "converse-core",
"converse-api", "converse-api",
// TODO: remove this dependency
"converse-controlbox",
"converse-chatview"
], factory); ], factory);
}(this, function (converse, converse_api) { }(this, function (converse, converse_api) {
"use strict"; "use strict";
@ -161,13 +158,6 @@
} }
return model; return model;
} }
},
ControlBoxView: {
onControlBoxToggleHidden: function () {
converse.chatboxviews.trimChats(this);
this._super.onControlBoxToggleHidden.apply(this, arguments);
},
} }
}, },
@ -368,6 +358,11 @@
}); });
}; };
converse.on('ready', onLogin); converse.on('ready', onLogin);
converse.on('controlBoxOpened', function (chatbox) {
// Wrapped in anon method because at scan time, chatboxviews
// attr not set yet.
converse.chatboxviews.trimChats(chatbox);
});
} }
}); });
})); }));