aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about/about-follows/about-follows.component.ts
diff options
context:
space:
mode:
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.ts29
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) {