[Notifications] Improve handling of centre
This commit is contained in:
		| @@ -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 () { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user