diff options
Diffstat (limited to 'client/src/app/+about/about-follows/about-follows.component.ts')
-rw-r--r-- | client/src/app/+about/about-follows/about-follows.component.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts index e5526248c..00bd48c9c 100644 --- a/client/src/app/+about/about-follows/about-follows.component.ts +++ b/client/src/app/+about/about-follows/about-follows.component.ts | |||
@@ -13,6 +13,8 @@ import { InstanceFollowService } from '@app/shared/shared-instance' | |||
13 | export class AboutFollowsComponent implements OnInit { | 13 | export class AboutFollowsComponent implements OnInit { |
14 | followers: string[] = [] | 14 | followers: string[] = [] |
15 | followings: string[] = [] | 15 | followings: string[] = [] |
16 | moreFollowers: string[] = [] | ||
17 | moreFollowings: string[] = [] | ||
16 | 18 | ||
17 | showMoreFollowers = false | 19 | showMoreFollowers = false |
18 | showMoreFollowings = false | 20 | showMoreFollowings = false |
@@ -75,7 +77,9 @@ export class AboutFollowsComponent implements OnInit { | |||
75 | .subscribe( | 77 | .subscribe( |
76 | resultList => { | 78 | resultList => { |
77 | const newFollowers = resultList.data.map(r => r.follower.host) | 79 | const newFollowers = resultList.data.map(r => r.follower.host) |
78 | this.followers = this.followers.concat(newFollowers) | 80 | if (this.followers.length === 0) this.followers = this.followers.concat(newFollowers) |
81 | |||
82 | else this.moreFollowers = this.moreFollowers.concat(newFollowers) | ||
79 | 83 | ||
80 | this.followersPagination.totalItems = resultList.total | 84 | this.followersPagination.totalItems = resultList.total |
81 | 85 | ||
@@ -93,7 +97,9 @@ export class AboutFollowsComponent implements OnInit { | |||
93 | .subscribe( | 97 | .subscribe( |
94 | resultList => { | 98 | resultList => { |
95 | const newFollowings = resultList.data.map(r => r.following.host) | 99 | const newFollowings = resultList.data.map(r => r.following.host) |
96 | this.followings = this.followings.concat(newFollowings) | 100 | if (this.followings.length===0) this.followings = this.followings.concat(newFollowings) |
101 | |||
102 | else this.moreFollowings = this.moreFollowings.concat(newFollowings) | ||
97 | 103 | ||
98 | this.followingsPagination.totalItems = resultList.total | 104 | this.followingsPagination.totalItems = resultList.total |
99 | 105 | ||