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.ts6
1 files changed, 4 insertions, 2 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 2f6ed061a..d7c722355 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
@@ -45,7 +45,7 @@ export class UserNotificationsComponent implements OnInit {
45 } 45 }
46 46
47 loadNotifications (reset?: boolean) { 47 loadNotifications (reset?: boolean) {
48 this.userNotificationService.listMyNotifications({ 48 const options = {
49 pagination: this.componentPagination, 49 pagination: this.componentPagination,
50 ignoreLoadingBar: this.ignoreLoadingBar, 50 ignoreLoadingBar: this.ignoreLoadingBar,
51 sort: { 51 sort: {
@@ -53,7 +53,9 @@ export class UserNotificationsComponent implements OnInit {
53 // if we order by creation date, we want DESC. all other fields are ASC (like unread). 53 // if we order by creation date, we want DESC. all other fields are ASC (like unread).
54 order: this.sortField === 'createdAt' ? -1 : 1 54 order: this.sortField === 'createdAt' ? -1 : 1
55 } 55 }
56 }) 56 }
57
58 this.userNotificationService.listMyNotifications(options)
57 .subscribe( 59 .subscribe(
58 result => { 60 result => {
59 this.notifications = reset ? result.data : this.notifications.concat(result.data) 61 this.notifications = reset ? result.data : this.notifications.concat(result.data)