From 2f8b8b65d46fe1299736e7b55161c79e9de5e759 Mon Sep 17 00:00:00 2001 From: FernandoAscencio <48699277+FernandoAscencio@users.noreply.github.com> Date: Wed, 17 May 2023 11:48:32 -0400 Subject: [PATCH] notifications: toaster container closes when empty (#12457) The commit adds a condition so that the toaster container will close when empty. The issue was found 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);