]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/users/user-notifications.component.ts
Add video filters to common video pages
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / users / user-notifications.component.ts
index 96b141543d04758ead52dee960d7d8de3a10dd35..50005b855f3513fb0408457ee4960c4ef1f097f6 100644 (file)
@@ -56,8 +56,8 @@ export class UserNotificationsComponent implements OnInit {
     }
 
     this.userNotificationService.listMyNotifications(options)
-        .subscribe(
-          result => {
+        .subscribe({
+          next: result => {
             this.notifications = reset ? result.data : this.notifications.concat(result.data)
             this.componentPagination.totalItems = result.total
 
@@ -66,8 +66,8 @@ export class UserNotificationsComponent implements OnInit {
             this.onDataSubject.next(result.data)
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
   onNearOfBottom () {
@@ -84,26 +84,26 @@ export class UserNotificationsComponent implements OnInit {
     if (notification.read) return
 
     this.userNotificationService.markAsRead(notification)
-        .subscribe(
-          () => {
+        .subscribe({
+          next: () => {
             notification.read = true
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
   markAllAsRead () {
     this.userNotificationService.markAllAsRead()
-        .subscribe(
-          () => {
+        .subscribe({
+          next: () => {
             for (const notification of this.notifications) {
               notification.read = true
             }
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
   }
 
   changeSortColumn (column: string) {