Commit ca5a00d3 authored by JC Brand's avatar JC Brand

Some cleanup and remove unused file.

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