From bf01364cf349423698e91cd31027a2689bc075b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 3 Nov 2020 13:51:58 +0200 Subject: [PATCH] Remove toast clear in project overview --- apps/red-ui/src/app/notification/notification.service.ts | 3 +-- .../project-overview-screen.component.ts | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/red-ui/src/app/notification/notification.service.ts b/apps/red-ui/src/app/notification/notification.service.ts index edf75d17a..ef6615075 100644 --- a/apps/red-ui/src/app/notification/notification.service.ts +++ b/apps/red-ui/src/app/notification/notification.service.ts @@ -32,7 +32,7 @@ export class NotificationService { }); } - showToastNotification( + public showToastNotification( message: string, title?: string, notificationType: NotificationType = NotificationType.INFO, @@ -43,7 +43,6 @@ export class NotificationService { return this._toastr.error(message, title, options); case NotificationType.SUCCESS: return this._toastr.success(message, title, options); - break; case NotificationType.WARNING: return this._toastr.warning(message, title, options); case NotificationType.INFO: diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts index c4f21c77d..62831d654 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts @@ -43,7 +43,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { @ViewChild('sortingComponent', { static: true }) public sortingComponent: SortingComponent; public sortingOption: SortingOption = { column: 'added', order: 'desc' }; - private _rulesChangedToast: ActiveToast; constructor( public readonly appStateService: AppStateService, @@ -79,9 +78,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { ngOnDestroy(): void { this._fileDropOverlayService.cleanupFileDropHandling(); - if (this._rulesChangedToast && this._rulesChangedToast.toastRef) { - this._rulesChangedToast.toastRef.close(); - } } public get user() { @@ -116,7 +112,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { return; } - this._rulesChangedToast = this._notificationService.showToastNotification( + this._notificationService.showToastNotification( `${this._translateService.instant( 'project-overview.new-rule.toast.message.label' )} ${this._translateService.instant(