]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts
Fix mark all as read notifications
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-notifications / my-account-notifications.component.ts
CommitLineData
2f1548fd
C
1import { Component, ViewChild } from '@angular/core'
2import { UserNotificationsComponent } from '@app/shared'
3
4@Component({
5 templateUrl: './my-account-notifications.component.html',
6 styleUrls: [ './my-account-notifications.component.scss' ]
7})
8export class MyAccountNotificationsComponent {
f36da21e 9 @ViewChild('userNotification', { static: true }) userNotification: UserNotificationsComponent
2f1548fd
C
10
11 markAllAsRead () {
12 this.userNotification.markAllAsRead()
13 }
10475dea 14
bc6f8863
C
15 hasUnreadNotifications () {
16 return this.userNotification.notifications.filter(n => n.read === false).length !== 0
10475dea 17 }
2f1548fd 18}