Simplify by removing need to override createItemView

This commit is contained in:
JC Brand 2017-12-22 13:37:08 +00:00
parent 1178badec8
commit f59048061f
2 changed files with 2 additions and 14 deletions

View File

@ -33,6 +33,7 @@
- Fetch VCard when starting a chat with someone not in the user's roster.
- Show status messages in an MUC room when a user's role changes.
- In MUC chat rooms, collapse multiple, consecutive join/leave messages.
- Performance improvements for rendering private chats, rooms and the contacts roster.
### API changes
- New API method `_converse.disco.supports` to check whether a certain

View File

@ -676,7 +676,7 @@
_converse.RosterGroupView = Backbone.OrderedListView.extend({
tagName: 'div',
className: 'roster-group',
className: 'roster-group hidden',
events: {
"click a.group-toggle": "toggle"
},
@ -716,19 +716,6 @@
return this;
},
createItemView (contact) {
const contact_view =
Backbone.OrderedListView.prototype.createItemView.apply(this, arguments);
if (contact_view.mayBeShown()) {
if (this.model.get('state') === _converse.CLOSED) {
u.hideElement(contact_view.el);
} else {
u.showElement(contact_view.el);
}
u.showElement(this.el);
}
},
show () {
u.showElement(this.el);
_.each(this.getAll(), (contact_view) => {