Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support clearing previous notification #40

Open
ikus060 opened this issue May 30, 2024 · 2 comments
Open

Support clearing previous notification #40

ikus060 opened this issue May 30, 2024 · 2 comments

Comments

@ikus060
Copy link
Contributor

ikus060 commented May 30, 2024

Hello,

I'm a new user of this library. Thanks a lot for this simple to use notification library for Windows !

I have a specific use case in my application where I want to raise a notification under certain conditions, but if theses conditions are no longer meet, I want to be able to clear the previous notification that was raised.

e.g.:
If connection to remote server cannot be established, then I raise a notification
..
When connection to remote server is restored, I want to clear the notification.

Looking at Windows API. Is seams to be possible to update or clear notification by defining tag and/or group.

My expectations

  1. the function notify() should allow defining custom tag and custom group
  2. a new function remove(tag, group) should be defined to clear notification identified by tag and group.
@Radexito
Copy link

+1 I also need this.

Lets say my app is doing Step1, then it finished it so it showed user the toast (he did not close it).
Now user starts doing Step2, i want to clear all toasts.

@ikus060
Copy link
Contributor Author

ikus060 commented Jun 14, 2024

@Radexito This is now supported by calling clear_toast(app_id=APP_ID, tag=notification_id, group='default').

But I did not update the README with an example.

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

No branches or pull requests

2 participants