From bc6f886347f676220847461600122cde86edc272 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Jan 2020 15:59:17 +0100 Subject: Fix mark all as read notifications --- client/src/app/shared/users/user-notifications.component.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/app/shared/users/user-notifications.component.ts') diff --git a/client/src/app/shared/users/user-notifications.component.ts b/client/src/app/shared/users/user-notifications.component.ts index 3c9eb369d..977dd8925 100644 --- a/client/src/app/shared/users/user-notifications.component.ts +++ b/client/src/app/shared/users/user-notifications.component.ts @@ -15,6 +15,7 @@ export class UserNotificationsComponent implements OnInit { @Input() ignoreLoadingBar = false @Input() infiniteScroll = true @Input() itemsPerPage = 20 + @Input() markAllAsReadSubject: Subject @Output() notificationsLoaded = new EventEmitter() @@ -40,6 +41,10 @@ export class UserNotificationsComponent implements OnInit { } this.loadMoreNotifications() + + if (this.markAllAsReadSubject) { + this.markAllAsReadSubject.subscribe(() => this.markAllAsRead()) + } } loadMoreNotifications () { -- cgit v1.2.3