This repository was archived by the owner on May 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments