diff options
author | MahdiTurki <mahditurki123@yahoo.fr> | 2020-04-27 11:18:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-14 09:57:41 +0100 |
commit | 49c4dd7ec32e210537e98aca11a391c025224c0f (patch) | |
tree | 66220d130478cc2eba43e474e8c5a656535a5040 /client/src/app/+about/about-follows/about-follows.component.ts | |
parent | 5721fd8374e732c4dfa149c54a800db74591c245 (diff) | |
download | PeerTube-49c4dd7ec32e210537e98aca11a391c025224c0f.tar.gz PeerTube-49c4dd7ec32e210537e98aca11a391c025224c0f.tar.zst PeerTube-49c4dd7ec32e210537e98aca11a391c025224c0f.zip |
Add button to display full list in About page
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 | 29 |
1 files changed, 14 insertions, 15 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 17c6903b8..d88974b59 100644 --- a/client/src/app/+about/about-follows/about-follows.component.ts +++ b/client/src/app/+about/about-follows/about-follows.component.ts | |||
@@ -14,6 +14,9 @@ export class AboutFollowsComponent implements OnInit { | |||
14 | followers: string[] = [] | 14 | followers: string[] = [] |
15 | followings: string[] = [] | 15 | followings: string[] = [] |
16 | 16 | ||
17 | showMoreFollowers = false; | ||
18 | showMoreFollowings = false; | ||
19 | |||
17 | followersPagination: ComponentPagination = { | 20 | followersPagination: ComponentPagination = { |
18 | currentPage: 1, | 21 | currentPage: 1, |
19 | itemsPerPage: 20, | 22 | itemsPerPage: 20, |
@@ -45,24 +48,20 @@ export class AboutFollowsComponent implements OnInit { | |||
45 | this.loadMoreFollowings() | 48 | this.loadMoreFollowings() |
46 | } | 49 | } |
47 | 50 | ||
48 | onNearOfBottom () { | 51 | loadAllFollowings () { |
49 | this.onNearOfFollowersBottom() | 52 | while(hasMoreItems(this.followingsPagination)) { |
53 | this.followingsPagination.currentPage += 1 | ||
50 | 54 | ||
51 | this.onNearOfFollowingsBottom() | 55 | this.loadMoreFollowings() |
56 | } | ||
52 | } | 57 | } |
53 | 58 | ||
54 | onNearOfFollowersBottom () { | 59 | loadAllFollowers () { |
55 | if (!hasMoreItems(this.followersPagination)) return | 60 | while(hasMoreItems(this.followersPagination)) { |
56 | 61 | this.followersPagination.currentPage += 1 | |
57 | this.followersPagination.currentPage += 1 | 62 | |
58 | this.loadMoreFollowers() | 63 | this.loadMoreFollowers(); |
59 | } | 64 | } |
60 | |||
61 | onNearOfFollowingsBottom () { | ||
62 | if (!hasMoreItems(this.followingsPagination)) return | ||
63 | |||
64 | this.followingsPagination.currentPage += 1 | ||
65 | this.loadMoreFollowings() | ||
66 | } | 65 | } |
67 | 66 | ||
68 | buildLink (host: string) { | 67 | buildLink (host: string) { |