Skip to content

Commit

Permalink
Improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodh committed Jul 8, 2024
1 parent 8aa1135 commit d1d43f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ function showNotification(_event: IpcMainInvokeEvent, data: DcNotification) {
notify.close()
})
notify.on('close', () => {
// this can be triggered by system out when the message
// is moved to notification center (Window, Linux)
// on Window and Linux this can be triggered by system time out
// when the message is moved to notification center so only close
// the notification on this event on Mac
if (isMac) {
notifications[chatId] =
notifications[chatId]?.filter(n => n !== notify) || []
}
/* ignore-console-log */
console.log('Notification close event triggered', notify)
})

Expand Down

0 comments on commit d1d43f9

Please sign in to comment.