diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-06 15:59:17 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-06 15:59:17 +0100 |
commit | bc6f886347f676220847461600122cde86edc272 (patch) | |
tree | a922e2ffe5bb536432a726793f025a1ed7bb2722 /client/src/app/shared/users | |
parent | 93d54cc769d88ecb2d7ead3ca293dac52653c13f (diff) | |
download | PeerTube-bc6f886347f676220847461600122cde86edc272.tar.gz PeerTube-bc6f886347f676220847461600122cde86edc272.tar.zst PeerTube-bc6f886347f676220847461600122cde86edc272.zip |
Fix mark all as read notifications
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user-notifications.component.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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 { | |||
15 | @Input() ignoreLoadingBar = false | 15 | @Input() ignoreLoadingBar = false |
16 | @Input() infiniteScroll = true | 16 | @Input() infiniteScroll = true |
17 | @Input() itemsPerPage = 20 | 17 | @Input() itemsPerPage = 20 |
18 | @Input() markAllAsReadSubject: Subject<boolean> | ||
18 | 19 | ||
19 | @Output() notificationsLoaded = new EventEmitter() | 20 | @Output() notificationsLoaded = new EventEmitter() |
20 | 21 | ||
@@ -40,6 +41,10 @@ export class UserNotificationsComponent implements OnInit { | |||
40 | } | 41 | } |
41 | 42 | ||
42 | this.loadMoreNotifications() | 43 | this.loadMoreNotifications() |
44 | |||
45 | if (this.markAllAsReadSubject) { | ||
46 | this.markAllAsReadSubject.subscribe(() => this.markAllAsRead()) | ||
47 | } | ||
43 | } | 48 | } |
44 | 49 | ||
45 | loadMoreNotifications () { | 50 | loadMoreNotifications () { |