]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+about/about-follows/about-follows.component.ts
Improve notification settings UI
[github/Chocobozzz/PeerTube.git] / client / src / app / +about / about-follows / about-follows.component.ts
index d335cbf45e43279f46131691e9fbef0ddea0d988..84b47e96791ac1eab94108ed2e2582cf48260035 100644 (file)
@@ -88,11 +88,11 @@ export class AboutFollowsComponent implements OnInit {
   }
 
   private loadMoreFollowers (reset = false) {
-    const pagination = this.restService.componentPaginationToRestPagination(this.followersPagination)
+    const pagination = this.restService.componentToRestPagination(this.followersPagination)
 
-    this.followService.getFollowers({ pagination: pagination, sort: this.sort, state: 'accepted' })
-        .subscribe(
-          resultList => {
+    this.followService.getFollowers({ pagination, sort: this.sort, state: 'accepted' })
+        .subscribe({
+          next: resultList => {
             if (reset) this.followers = []
 
             const newFollowers = resultList.data.map(r => r.follower.host)
@@ -101,16 +101,16 @@ export class AboutFollowsComponent implements OnInit {
             this.followersPagination.totalItems = resultList.total
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
   private loadMoreFollowings (reset = false) {
-    const pagination = this.restService.componentPaginationToRestPagination(this.followingsPagination)
+    const pagination = this.restService.componentToRestPagination(this.followingsPagination)
 
     this.followService.getFollowing({ pagination, sort: this.sort, state: 'accepted' })
-        .subscribe(
-          resultList => {
+        .subscribe({
+          next: resultList => {
             if (reset) this.followings = []
 
             const newFollowings = resultList.data.map(r => r.following.host)
@@ -119,8 +119,8 @@ export class AboutFollowsComponent implements OnInit {
             this.followingsPagination.totalItems = resultList.total
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
 }