Some cleanup and remove unused file.

This commit is contained in:
JC Brand 2016-12-19 07:09:31 +00:00
parent 39d62209c7
commit ca5a00d36b

View File

@ -436,7 +436,7 @@
return this; return this;
}, },
positionFetchedGroups: function (model, resp, options) { positionFetchedGroups: function () {
/* Instead of throwing an add event for each group /* Instead of throwing an add event for each group
* fetched, we wait until they're all fetched and then * fetched, we wait until they're all fetched and then
* we position them. * we position them.
@ -445,19 +445,20 @@
* positioned aren't already in inserted into the * positioned aren't already in inserted into the
* roster DOM element. * roster DOM element.
*/ */
var that = this;
this.model.sort(); this.model.sort();
this.model.each(function (group, idx) { this.model.each(function (group, idx) {
var view = this.get(group.get('name')); var view = that.get(group.get('name'));
if (!view) { if (!view) {
view = new converse.RosterGroupView({model: group}); view = new converse.RosterGroupView({model: group});
this.add(group.get('name'), view.render()); that.add(group.get('name'), view.render());
} }
if (idx === 0) { if (idx === 0) {
this.$roster.append(view.$el); that.$roster.append(view.$el);
} else { } else {
this.appendGroup(view); that.appendGroup(view);
} }
}.bind(this)); });
}, },
positionGroup: function (view) { positionGroup: function (view) {