Browse Source

Some cleanup and remove unused file.

JC Brand 8 năm trước cách đây
mục cha
commit
ca5a00d36b
1 tập tin đã thay đổi với 7 bổ sung6 xóa
  1. 7 6
      src/converse-rosterview.js

+ 7 - 6
src/converse-rosterview.js

@@ -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) {