From 7ff986e7a6391b1bb7740afb089028c8e7c4a994 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sat, 22 Mar 2025 14:28:31 +0100 Subject: [PATCH] [Notifications] Improve handling of centre --- config/ags/notifications/handler.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/ags/notifications/handler.tsx b/config/ags/notifications/handler.tsx index ee2ad42..44f34a8 100644 --- a/config/ags/notifications/handler.tsx +++ b/config/ags/notifications/handler.tsx @@ -59,7 +59,11 @@ class Notifier implements Subscribable { private show ( id: number ) { this.set( id, Notification( { notification: this.notifications.get( id )!, - onHoverLost: () => this.hide( id ), + onHoverLost: () => { + if ( !this.menuOpen ) { + this.hide( id ); + } + }, setup: () => timeout( TIMEOUT_DELAY, () => { if ( !this.menuOpen ) { this.hide( id ); @@ -100,6 +104,9 @@ class Notifier implements Subscribable { this.hide( id ); this.notifications.get( id )?.dismiss(); this.notifications.delete( id ); + if ( this.notifications.size == 0 ) { + this.menuOpen = false; + } } openNotificationMenu () {