From 399f53e441ed38577ee2d4f6852cf7e911f4911d Mon Sep 17 00:00:00 2001 From: FernandoAscencio Date: Tue, 25 Apr 2023 17:54:35 -0400 Subject: [PATCH] notifications: toaster container closes when empty This commit adds: - Condition so that the toaster container will close when empty. This was an issue when testing 12446. When seemingly it needed two `esc` Signed-Off-By: FernandoAscencio --- packages/messages/src/browser/notifications-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/messages/src/browser/notifications-manager.ts b/packages/messages/src/browser/notifications-manager.ts index 0daf43bbe500d..1e3017424fe25 100644 --- a/packages/messages/src/browser/notifications-manager.ts +++ b/packages/messages/src/browser/notifications-manager.ts @@ -131,7 +131,7 @@ export class NotificationManager extends MessageClient { return; } this.deferredResults.delete(messageId); - if (this.centerVisible && this.notifications.size === 0) { + if ((this.centerVisible && !this.notifications.size) || (this.toastsVisible && !this.toasts.size)) { this.visibilityState = 'hidden'; } result.resolve(action);