aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about/about-follows/about-follows.component.ts
diff options
context:
space:
mode:
authorMahdiTurki <mahditurki123@yahoo.fr>2020-04-27 20:14:40 +0100
committerChocobozzz <me@florianbigard.com>2020-12-14 09:57:41 +0100
commit2ce949454f5305be2bf3b1a66385b1c16cbb791f (patch)
treed17c9f2960429499644428214d5af90db705f7c2 /client/src/app/+about/about-follows/about-follows.component.ts
parentbd49f8e988429447747e34533df5eab5b7bed210 (diff)
downloadPeerTube-2ce949454f5305be2bf3b1a66385b1c16cbb791f.tar.gz
PeerTube-2ce949454f5305be2bf3b1a66385b1c16cbb791f.tar.zst
PeerTube-2ce949454f5305be2bf3b1a66385b1c16cbb791f.zip
Add hide list
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.ts10
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'
13export class AboutFollowsComponent implements OnInit { 13export 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