Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 605cc82

Browse files
committed
use onDidClearNotifications
1 parent 8e1dccf commit 605cc82

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/main.coffee

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ Notifications =
6363
@addNotificationsLogSubscriptions() if @notificationsLog?
6464
@subscriptions.add atom.workspace.addOpener (uri) => @createLog() if uri is NotificationsLog::getURI()
6565
@subscriptions.add atom.commands.add 'atom-workspace', 'notifications:toggle-log', -> atom.workspace.toggle(NotificationsLog::getURI())
66-
@subscriptions.add atom.commands.add 'atom-workspace', 'notifications:clear-log', =>
66+
@subscriptions.add atom.commands.add 'atom-workspace', 'notifications:clear-log', ->
6767
for notification in atom.notifications.getNotifications()
6868
notification.options.dismissable = true
6969
notification.dismissed = false
7070
notification.dismiss()
7171
atom.notifications.clear()
72-
@notificationsLog?.clearLogItems() # TODO: remove this once atom/atom#16074 is released
7372

7473
deactivate: ->
7574
@subscriptions.dispose()

lib/notifications-log.coffee

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ module.exports = class NotificationsLog
2222
@typesHidden = typesHidden if typesHidden?
2323
@emitter = new Emitter
2424
@subscriptions = new CompositeDisposable
25-
# TODO: uncomment next line when atom/atom#16074 is released
26-
# @subscriptions.add atom.notifications.onDidClearNotifications => @clear()
25+
@subscriptions.add atom.notifications.onDidClearNotifications => @clear()
2726
@render()
2827
@subscriptions.add new Disposable => @clearLogItems()
2928

0 commit comments

Comments
 (0)