Commit 556d2647 authored by JC Brand's avatar JC Brand

Remove "optimization" code no longer used or relevant.

parent 2eb727f9
...@@ -1432,18 +1432,10 @@ ...@@ -1432,18 +1432,10 @@
}, },
onChatBoxAdded: function (item) { onChatBoxAdded: function (item) {
var view = this.get(item.get('id')); // Views aren't created here, since the core code doesn't
// Views aren't created here, since the core code doesn't have
// contain any views. Instead, they're created in overrides in // contain any views. Instead, they're created in overrides in
// converse-chatiew.js and/or converse-muc.js // plugins, such as in converse-chatview.js and converse-muc.js
if (view) { return this.get(item.get('id'));
// This is an optimization. We don't remove older views, so
// when one is available, we reuse it.
delete view.model; // Remove ref to old model to help garbage collection
view.model = item;
view.initialize();
}
return view;
}, },
removeChat: function (item) { removeChat: function (item) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment