diff --git a/src/app/shared/notifications/notification/notification.component.ts b/src/app/shared/notifications/notification/notification.component.ts
index 6976b67834..aea7c5831b 100644
--- a/src/app/shared/notifications/notification/notification.component.ts
+++ b/src/app/shared/notifications/notification/notification.component.ts
@@ -1,4 +1,4 @@
-import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
+import { Observable, of as observableOf } from 'rxjs';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
@@ -48,6 +48,11 @@ export class NotificationComponent implements OnInit, OnDestroy {
@Input() public notification = null as INotification;
+ /**
+ * Whether this notification's countdown should be paused
+ */
+ @Input() public isPaused$: Observable
;
+
// Progress bar variables
public title: Observable;
public content: Observable;
@@ -66,7 +71,6 @@ export class NotificationComponent implements OnInit, OnDestroy {
private count = 0;
private start: any;
private diff: any;
- public isPaused$: BehaviorSubject = new BehaviorSubject(false);
public animate: string;
constructor(private notificationService: NotificationsService,
diff --git a/src/app/shared/notifications/notifications-board/notifications-board.component.html b/src/app/shared/notifications/notifications-board/notifications-board.component.html
index 15f5044bc4..854842f30d 100644
--- a/src/app/shared/notifications/notifications-board/notifications-board.component.html
+++ b/src/app/shared/notifications/notifications-board/notifications-board.component.html
@@ -1,7 +1,10 @@
-
+
+ [notification]="a" [isPaused$]="isPaused$">
diff --git a/src/app/shared/notifications/notifications-board/notifications-board.component.ts b/src/app/shared/notifications/notifications-board/notifications-board.component.ts
index 829cfadf0f..f153d1009e 100644
--- a/src/app/shared/notifications/notifications-board/notifications-board.component.ts
+++ b/src/app/shared/notifications/notifications-board/notifications-board.component.ts
@@ -9,7 +9,7 @@ import {
} from '@angular/core';
import { select, Store } from '@ngrx/store';
-import { Subscription } from 'rxjs';
+import { BehaviorSubject, Subscription } from 'rxjs';
import { difference } from 'lodash';
import { NotificationsService } from '../notifications.service';
@@ -44,6 +44,11 @@ export class NotificationsBoardComponent implements OnInit, OnDestroy {
public rtl = false;
public animate: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale' = 'fromRight';
+ /**
+ * Whether to pause the dismiss countdown of all notifications on the board
+ */
+ public isPaused$: BehaviorSubject
= new BehaviorSubject(false);
+
constructor(private service: NotificationsService,
private store: Store,
private cdr: ChangeDetectorRef) {
@@ -129,7 +134,6 @@ export class NotificationsBoardComponent implements OnInit, OnDestroy {
}
});
}
-
ngOnDestroy(): void {
if (this.sub) {
this.sub.unsubscribe();