Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 7da9431

Browse files
committed
remove unneeded fetching check
1 parent 4ee4b6b commit 7da9431

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

js/views/userListVw.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = Backbone.View.extend({
3131
this.fetchedUsers = this.usersShort.length;
3232
this.totalUsers = this.options.followerCount;
3333
this.$container = $('#obContainer');
34-
this.fetching = false;
3534

3635
//listen to scrolling on container
3736
this.scrollHandler = __.bind(
@@ -41,7 +40,6 @@ module.exports = Backbone.View.extend({
4140

4241
this.listenTo(this.usersShort, 'add', (data)=>{
4342
this.fetchedUsers = this.usersShort.length;
44-
this.fetching = false;
4543
this.renderUserSet(this.nextUserToShow, this.nextUserToShow + this.showPerScroll);
4644
});
4745

@@ -83,10 +81,9 @@ module.exports = Backbone.View.extend({
8381

8482
this.nextUserToShow = this.nextUserToShow >= this.fetchedUsers ? this.nextUserToShow : this.nextUserToShow + this.showPerScroll;
8583

86-
if(this.fetchMoreAfter && end == this.fetchMoreAfter && this.fetchedUsers < this.totalUsers && !this.fetching){
84+
if(this.fetchMoreAfter && end == this.fetchMoreAfter && this.fetchedUsers < this.totalUsers){
8785
this.fetchMoreAfter = this.fetchMoreAfter + this.options.perFetch;
8886
this.trigger('fetchMoreUsers');
89-
this.fetching = true;
9087
}
9188
},
9289

0 commit comments

Comments
 (0)