Skip to content

feat: add support for waiting on notification click#70

Merged
hoodie merged 2 commits intoh4llow3En:masterfrom
tasuren:master
Jul 3, 2025
Merged

feat: add support for waiting on notification click#70
hoodie merged 2 commits intoh4llow3En:masterfrom
tasuren:master

Conversation

@tasuren
Copy link
Copy Markdown
Contributor

@tasuren tasuren commented May 23, 2025

This PR solves issue #69. It adds the method click to Notification for waiting notification click.

Example of usage:

let response = send_notification(
    "clickable notification",
    None,
    "click me",
    Some(Notification::new().click(true)),
)
.unwrap();

The purpose of adding the click method to wait for notification click is to ensure backward compatibility. Otherwise, it would block a thread, but the developer might not realize that.

@hoodie
Copy link
Copy Markdown
Collaborator

hoodie commented Jun 8, 2025

sorry for the long wait. Thanks for the contribution, I think this is a good fit. I would like to rename the .click(bool) function however to something more explicit like ".wait_for_click().

@tasuren
Copy link
Copy Markdown
Contributor Author

tasuren commented Jun 8, 2025

Thank you for your confirmation.
I agree, wait_for_click() is a much clearer name. I appreciate you making the change.

@hoodie hoodie closed this Jul 3, 2025
@hoodie hoodie reopened this Jul 3, 2025
@hoodie hoodie merged commit d15d4fa into h4llow3En:master Jul 3, 2025
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.

2 participants