controlbox: Only render the contacts panel when connected
Otherwise it gets rendered multiple times (at least during testing).
This commit is contained in:
parent
8fe7fd2ec2
commit
7c9475e9fc
|
@ -242,14 +242,17 @@
|
|||
} else {
|
||||
this.hide();
|
||||
}
|
||||
this.$el.html(tpl_controlbox(
|
||||
this.el.innerHTML = tpl_controlbox(
|
||||
_.extend(this.model.toJSON(), {
|
||||
sticky_controlbox: _converse.sticky_controlbox
|
||||
}))
|
||||
);
|
||||
if (!_converse.connection.connected || !_converse.connection.authenticated || _converse.connection.disconnecting) {
|
||||
'sticky_controlbox': _converse.sticky_controlbox
|
||||
}));
|
||||
|
||||
if (!_converse.connection.connected ||
|
||||
!_converse.connection.authenticated ||
|
||||
_converse.connection.disconnecting) {
|
||||
this.renderLoginPanel();
|
||||
} else if (!this.contactspanel || !this.contactspanel.$el.is(':visible')) {
|
||||
} else if (this.model.get('connected') &&
|
||||
(!this.contactspanel || !this.contactspanel.$el.is(':visible'))) {
|
||||
this.renderContactsPanel();
|
||||
}
|
||||
return this;
|
||||
|
|
Loading…
Reference in New Issue
Block a user