X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fusers%2Fuser-notifications.component.ts;h=977dd8925c80eea6db5703f7eb7f21d00f41ef7c;hb=bc6f886347f676220847461600122cde86edc272;hp=3c9eb369d3c54b0268b611cd4ada48c2e73735e9;hpb=93d54cc769d88ecb2d7ead3ca293dac52653c13f;p=github%2FChocobozzz%2FPeerTube.git 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 () {