Skip to content

Commit

Permalink
notifications: toaster container closes when empty (eclipse-theia#12457)
Browse files Browse the repository at this point in the history
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 <fernando.ascencio.cama@ericsson.com>
  • Loading branch information
FernandoAscencio authored May 17, 2023
1 parent 47b946e commit 2f8b8b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/messages/src/browser/notifications-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2f8b8b6

Please sign in to comment.