Event when notification is closed (using "x" button)


I'm periodically running a check which may create a balloon popup notification. I don't want for the thread to create a new notification if the old one is still visible so I store its visibility in a variable (setting it to true when calling the notify() method). Unfortunately the whenExpired()-Runnable is only called when the notification is expired by me. How can I find out if the notification was just closed (so I can set the visibility variable to false)?

1 comment
Comment actions Permalink

com.intellij.notification.NotificationsManager#getNotificationsOfType should work to check for existing, non-expired notifications.


Please sign in to leave a comment.