@@ -86,7 +86,9 @@ const createNotification = async (
8686 } ) ;
8787
8888 const notificationType = notificationTypes . get ( id ) ;
89- if ( notificationType === 'voice' ) {
89+
90+ // Only flash for chat-related notifications
91+ if ( notificationType === 'text' || notificationType === 'voice' ) {
9092 attentionDrawing . drawAttention ( id ) ;
9193 }
9294 } ) ;
@@ -99,10 +101,9 @@ const createNotification = async (
99101 } ) ;
100102 notifications . delete ( id ) ;
101103
102- const notificationType = notificationTypes . get ( id ) ;
103- if ( notificationType === 'voice' ) {
104- attentionDrawing . stopAttention ( id ) ;
105- }
104+ // Always stop attention for any notification type
105+ attentionDrawing . stopAttention ( id ) ;
106+
106107 notificationTypes . delete ( id ) ;
107108 notificationCategories . delete ( id ) ;
108109 } ) ;
@@ -243,13 +244,12 @@ export const setupNotifications = (): void => {
243244
244245 listen ( NOTIFICATIONS_NOTIFICATION_DISMISSED , ( action ) => {
245246 const notificationId = String ( action . payload . id ) ;
246- const notificationType = notificationTypes . get ( notificationId ) ;
247247
248248 notifications . get ( notificationId ) ?. close ( ) ;
249249
250- if ( notificationType === 'voice' ) {
251- attentionDrawing . stopAttention ( notificationId ) ;
252- }
250+ // stopAttention is safe and idempotent
251+ attentionDrawing . stopAttention ( notificationId ) ;
252+
253253 notificationTypes . delete ( notificationId ) ;
254254 } ) ;
255255} ;
0 commit comments