Skip to content

Add on_dispatched event #209

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

Merged

Conversation

PhrozenByte
Copy link
Contributor

@PhrozenByte PhrozenByte commented Nov 26, 2024

This event is fired when a notification was sent to the notifications server. This is less useful as class-level callback, but very useful with Notification, because it allows for a better separation of concerns (separates creating and sending notifications).

ToDo:

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.23%. Comparing base (26c6af2) to head (fc660b2).
Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
src/desktop_notifier/main.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   85.13%   85.23%   +0.09%     
==========================================
  Files          10       10              
  Lines         895      921      +26     
==========================================
+ Hits          762      785      +23     
- Misses        133      136       +3     
Flag Coverage Δ
pytest 85.23% <94.11%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PhrozenByte PhrozenByte force-pushed the enhancement/event-on_dispatched branch from c4df941 to 5141164 Compare November 26, 2024 13:41
This event is fired when a notification was sent to the notifications server. This is less useful as class-level callback, but very useful with `Notification`, because it allows for a better separation of concerns (separates creating and sending notifications).
@PhrozenByte PhrozenByte force-pushed the enhancement/event-on_dispatched branch from 5141164 to fc660b2 Compare November 26, 2024 13:43
@PhrozenByte PhrozenByte mentioned this pull request Nov 26, 2024
8 tasks
@samschott
Copy link
Owner

Thanks, I can see this being useful! Could you check if similar events are available on macOS and Windows?

@samschott samschott mentioned this pull request Nov 30, 2024
4 tasks
@PhrozenByte
Copy link
Contributor Author

This is a Desktop-Notifier-only event, i.e. doesn't rely on the notifications server and thus works with any backend.

@samschott
Copy link
Owner

Makes sense! I confused this with an event for notification being delivered, which would indeed need some information from the platforms.

@samschott samschott merged commit ac01c97 into samschott:main Nov 30, 2024
17 checks passed
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

Successfully merging this pull request may close these issues.

3 participants