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

Commit 7bafe8d

Browse files
committed
clean up
- clean up code - add instructional text
1 parent 7da9431 commit 7bafe8d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

js/languages/en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"SearchForItemsPlaceholder": "Type #games, #shoes or any #tag...",
8787
"SearchForPagesPlaceholder": "Search by name or keyword",
8888
"SearchFeedPlaceholder": "Type a keyword...",
89-
"SearchForFollowersPlaceholder": "Type a name...",
89+
"SearchForFollowersPlaceholder": "Search for a name in your currently loaded followers (scroll to load more).",
9090
"SearchForUsersPlaceholder": "Type a name...",
9191
"SearchOnUserStorePlaceholder": "Type a title...",
9292
"EstDeliveryDomesticPlaceholder": "3-5 Business Days",

js/views/userPageVw.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ module.exports = baseVw.extend({
697697
fetchFollowersParameters;
698698

699699
if(!ignoreTotal && this.followerFetchStart > 0 && this.followerFetchStart >= this.followerFetchTotal){
700+
//don't fetch again if all of the followers have been fetched
700701
return;
701702
}
702703

@@ -708,10 +709,10 @@ module.exports = baseVw.extend({
708709

709710
this.followers.fetch({
710711
data: fetchFollowersParameters,
711-
//timeout: 5000,
712712
success: (model)=> {
713713
var followerArray = model.get('followers');
714-
this.followerFetchTotal = model.get('count') || followerArray.length;
714+
715+
this.followerFetchTotal = model.get('count') || followerArray.length; //the length is for older servers
715716
this.$('.js-userFollowerCount').html(this.followerFetchTotal);
716717

717718
if (self.isRemoved()) return;
@@ -806,6 +807,7 @@ module.exports = baseVw.extend({
806807
"use strict";
807808

808809
model = model || [];
810+
//if view doesn't exist, create it
809811
if(!this.followerList) {
810812
this.followerList = new personListView({
811813
model: model,
@@ -825,6 +827,7 @@ module.exports = baseVw.extend({
825827
}
826828

827829
if (model.length) {
830+
//refresh search
828831
this.followersSearch = new window.List('searchFollowers', {
829832
valueNames: ['js-searchName', 'js-searchHandle'],
830833
page: 1000

0 commit comments

Comments
 (0)