From a565988c6f8aca6cfb4ebf6bd4902aa6ae5796c3 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Thu, 2 Nov 2017 10:59:04 -0500 Subject: [PATCH] add event --- src/notification-manager.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/notification-manager.js b/src/notification-manager.js index 3d15419d5..cd2a06e9e 100644 --- a/src/notification-manager.js +++ b/src/notification-manager.js @@ -27,6 +27,15 @@ class NotificationManager { return this.emitter.on('did-add-notification', callback) } + // Public: Invoke the given callback after the notifications have been cleared. + // + // * `callback` {Function} to be called after the notifications are cleared. + // + // Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidClearNotifications (callback) { + return this.emitter.on('did-clear-notifications', callback) + } + /* Section: Adding Notifications */