aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/users/user-notifications.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/users/user-notifications.component.ts')
-rw-r--r--client/src/app/shared/shared-main/users/user-notifications.component.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.ts b/client/src/app/shared/shared-main/users/user-notifications.component.ts
index 96b141543..50005b855 100644
--- a/client/src/app/shared/shared-main/users/user-notifications.component.ts
+++ b/client/src/app/shared/shared-main/users/user-notifications.component.ts
@@ -56,8 +56,8 @@ export class UserNotificationsComponent implements OnInit {
56 } 56 }
57 57
58 this.userNotificationService.listMyNotifications(options) 58 this.userNotificationService.listMyNotifications(options)
59 .subscribe( 59 .subscribe({
60 result => { 60 next: result => {
61 this.notifications = reset ? result.data : this.notifications.concat(result.data) 61 this.notifications = reset ? result.data : this.notifications.concat(result.data)
62 this.componentPagination.totalItems = result.total 62 this.componentPagination.totalItems = result.total
63 63
@@ -66,8 +66,8 @@ export class UserNotificationsComponent implements OnInit {
66 this.onDataSubject.next(result.data) 66 this.onDataSubject.next(result.data)
67 }, 67 },
68 68
69 err => this.notifier.error(err.message) 69 error: err => this.notifier.error(err.message)
70 ) 70 })
71 } 71 }
72 72
73 onNearOfBottom () { 73 onNearOfBottom () {
@@ -84,26 +84,26 @@ export class UserNotificationsComponent implements OnInit {
84 if (notification.read) return 84 if (notification.read) return
85 85
86 this.userNotificationService.markAsRead(notification) 86 this.userNotificationService.markAsRead(notification)
87 .subscribe( 87 .subscribe({
88 () => { 88 next: () => {
89 notification.read = true 89 notification.read = true
90 }, 90 },
91 91
92 err => this.notifier.error(err.message) 92 error: err => this.notifier.error(err.message)
93 ) 93 })
94 } 94 }
95 95
96 markAllAsRead () { 96 markAllAsRead () {
97 this.userNotificationService.markAllAsRead() 97 this.userNotificationService.markAllAsRead()
98 .subscribe( 98 .subscribe({
99 () => { 99 next: () => {
100 for (const notification of this.notifications) { 100 for (const notification of this.notifications) {
101 notification.read = true 101 notification.read = true
102 } 102 }
103 }, 103 },
104 104
105 err => this.notifier.error(err.message) 105 error: err => this.notifier.error(err.message)
106 ) 106 })
107 } 107 }
108 108
109 changeSortColumn (column: string) { 109 changeSortColumn (column: string) {