Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

A workaround for multiple repeating notifications #22

Merged
merged 1 commit into from Dec 17, 2017

Conversation

laughedelic
Copy link
Owner

On every new notification it goes through all matching old notifications
and dismisses them. We can do it only after the fact. Also we cannot
dismiss the new one instead, because if some old ones were dismissed
manually, user won't see the new notifications.

Fixes #20.

2017-12-10 05 37 19

(in this demo server sends warnings on any action, normally it shouldn't send them so often)

On every new notification it goes through all matching old notifications
 and dismisses them. We can do it only after the fact. Also we cannot
 dismiss the new one instead, because if some old ones were dismissed
 manually, user won't see the new notifications.
@laughedelic
Copy link
Owner Author

Notice that this is a general problem in the atom-notifications package and should be solved there. See atom/notifications#88 and other issues linked there. This is merely a hacky workaround.

I'm quite limited here, because I can only do things after notification has been displayed:

  • I can't easily hook to the server showMessage request to do something before it is received by the client
  • There is no onWillAddNotification hook in the Atom NotificationManager API, only onDidAddNotification

Yet, @cquiroz if you have any better idea how to handle it, let me know.

@laughedelic
Copy link
Owner Author

The particular message which caused this issue should be gone after scalameta/metals#116, but I'm going to merge this anyway for any other potentially annoying warnings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant