Commit 71add9c0 authored by JC Brand's avatar JC Brand

minimize: avoid unnecessary re-render

parent 40587aa2
...@@ -383,7 +383,8 @@ converse.plugins.add('converse-minimize', { ...@@ -383,7 +383,8 @@ converse.plugins.add('converse-minimize', {
async initialize () { async initialize () {
this.render(); this.render();
await this.initToggle(); await this.initToggle();
this.addMultipleChats(this.model.where({'minimized': true})); const chats = this.model.where({'minimized': true});
chats.length && this.addMultipleChats();
this.listenTo(this.model, "add", this.onChanged) this.listenTo(this.model, "add", this.onChanged)
this.listenTo(this.model, "destroy", this.removeChat) this.listenTo(this.model, "destroy", this.removeChat)
this.listenTo(this.model, "change:minimized", this.onChanged) this.listenTo(this.model, "change:minimized", this.onChanged)
......
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