From 2fd69fbf8f9b7c374dffd51a1cbe78f1a82ada00 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Mon, 11 Feb 2019 19:54:46 -0500 Subject: [PATCH] fix notification hub not hiding notifications --- .../notification-hub/notification-hub.component.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/components/notification-hub/notification-hub.component.ts b/src/app/components/notification-hub/notification-hub.component.ts index 9eded8cd..75341ce4 100644 --- a/src/app/components/notification-hub/notification-hub.component.ts +++ b/src/app/components/notification-hub/notification-hub.component.ts @@ -16,7 +16,7 @@ export class NotificationHubComponent implements OnInit { this.notifications.push(notification); setTimeout(() => { - this.notifications = this.notifications.filter(x => x.id === notification.id); + this.notifications = this.notifications.filter(x => x.id !== notification.id); }, 2000); }); @@ -32,10 +32,6 @@ export class NotificationHubComponent implements OnInit { } onClick(notification: NotificatioData): void{ - this.notifications = this.notifications.filter(x => x.id === notification.id); - - setTimeout(() => { - this.notifications.length = 0; - }, 500); + this.notifications = this.notifications.filter(x => x.id !== notification.id); } }